Ubuntu – Symbolic link permission denied, shared folder over cifs

I have synology rack , and im using one folder from my ubuntu 12.04. but I wont be able to create a symbolic link on mounted folder, getting permission denied error, below is my fstab entry

#//1.1.1.11/sologs  /nsm  cifs uid=1001,gid=1001,username=admin,password=123456,iocharset=utf8,sec=ntlm  0  0


I tried,

sudo ln -s /test /nsm


Error,

ln: failed to create symbolic link /nsm/test': Permission denied


You can't create symlinks on CIFS/samba shares. Symbolic links are intrinsic parts of the filesystem where the files are stored (aka the remote physical disk) and you can't modify the inodes of those unless you have direct access to the drive, which you don't due the characteristics of the CIFS protocol.

Simply put, you can't unless you are in the remote system itself.

There's an extension that would allow you to create symlinks from the remote server, but both the server must support it and you must mount the share which such option:

sfu`

When the CIFS Unix Extensions are not negotiated, attempt to create device files and fifos in a format compatible with Services for Unix (SFU). In addition retrieve bits 10-12 of the mode via the SETFILEBITS extended attribute (as SFU does). In the future the bottom 9 bits of the mode mode also will be emulated using queries of the security descriptor (ACL). [NB: requires version 1.39 or later of the CIFS VFS. To recognize symlinks and be able to create symlinks in an SFU interoperable form requires version 1.40 or later of the CIFS VFS kernel module.

Your user would also need permission in the server side to create symlinks.