symlinks with absolute paths in symlink data

Steve French smfltc at
Fri Oct 10 19:29:55 GMT 2003

As has been discussed before with current Samba (e.g. mount server share
to some local client directory, say /mnt, with smbfs or cifs vfs and "cd

Of the following examples, only example 4 fails.
1) ln -s existingfile file1
2) ln -s existingfile /mnt/file2
3) ln -s ./existingfile file3
4) ln -s /mnt/existingfile file4

Without changing Samba to special case symlinks, should we try to
resolve it on the client. ie.  Should the cifs vfs, knowing that the
absolute path is going to cause Samba problems, but noting that it is
within the share, strip off the path prefix (/mnt) and translate the
path to "./existingfile" or simply "existinfile"?

Symlink data is normally opaque to the client but this may be a case
where we have to make an exception (even though to local filesystems all
four symlinks would have worked, but remotely it fails) - it also is a
little more intuitive and compensates for the differences between the
namespace on the client and server.

More information about the samba-technical mailing list