1

A SAMBA server has a symbolic link, which I can verify it by mounting the same server with NFS:

lrwxrwxrwx 1 root   root     25 Aug 14 20:07 folder -> ../../../../folder/

The problem is, Windows can successfully recognize the symbolic link and access the linked folder, but on Ubuntu it fails because the symbolic link is treated like a common file:

-rwxrwxrwx 1 root root   0 Aug 14 20:07 folder*

What I used for the mount command was:

mount -t cifs //server/shared-folder local-folder -o username=tom,file_mode=0777,dir_mode=0777,nounix

schema

I have checked several solutions on SE, but all of them (e.g. this one) require a modification of the smb.conf file, which I don't have the permission.

So, my question is, since the Windows can access the symbolic link, is there any solution for the SAMBA client on Ubuntu to do this, without touching anything on the SAMBA server?

1

Your symbolic link points to a folder outside of the shared directory. Therefore it is not accessible in the mounted file system on Ubuntu.

7
  • Thank you. Sorry I didn't express it clearly, the link target is not a local folder of the Windows system either. See my update :) – Stan Aug 15 '18 at 7:33
  • Still your picture shows that the link target is outside the shared folder, so it cannot be reached in the samba mount. I don't know why this works in windows - is there a second share? – muclux Aug 15 '18 at 8:20
  • Your picture does not correspond to the link you gave. ../../../../folder should be a subdirectory of shared-folder. – muclux Aug 15 '18 at 8:28
  • Yes, the link target is indeed outside the shared folder. I confirmed there was no other share by net use * /del and then immediately accessed the \\server\shared-folder on a windows machine. It's really amazing that this works in windows. Theoretically speaking, if windows can do it, ubuntu should be able too. – Stan Aug 15 '18 at 8:41
  • Perhaps windows has a folder of the same name above the mount point. You cannot access something on the remote server which is outside the shared folder. If you could, you would have access to all files on the server by creating a symbolic link with a relative path pointing there. – muclux Aug 15 '18 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.