Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Windows Server 2008 R2 NTFS supports symlinks. If I log into the server as Administrator I can create symlinks with mklink, so I know the Admin user has the permissions to do this. If I mount a share onto an Ubuntu 10 client using mount -t cifs -o username='domain\Administrator' //server-name/smbshare /mnt/smbshare

and then try to create a symlink to a test file by doing ln -s testfile test_symlink I get the error 'ln: creating symbolic link `test_symlink': Operation not supported'

If I try just to read the contents of an existing symlink (created previously by shelling into the server) I get an 'Operation not supported' error. I have tried this with unix extensions = yes, follow symlinks = yes and wide links = yes in my smb.conf, and without them present.

Any ideas?

Further to this it seems that it's likely SMB1 does not support symlinks even if the underlying volume does. However SMB2 does - so I've tried this on a Fedora Core 13 VM which is running Samba 3.5.4, I set max protocol=smb2, with the same result as above. It's unclear to me though whether mount -t cifs actually utilises the underlying samba machinery, or whether it's a separate implementation...

share|improve this question

2 Answers 2

symbolic links will only work with an smb2 client. Otherwise you can set junction points on the server and these will show through to the client as regular files.

share|improve this answer

...and ... is the linux CIFS driver an SMB2 client?

I have encountered a similar problem:

A SAMBA share setup up on a linux server contains symlinks. I have set "follow symlinks = yes" in my server's smb.conf.

My Windows XP clients can correctly follow the symlink (it points to a directory), but when I mount that SAMBA share to my linux laptop using CIFS, my linux client sees that symlink as a file.

Someone reported this as a bug to the Ubuntu forums as well:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/137756

but the report has been closed with no action.

My linux client is running kernel 2.6.33, and appears to have mount.cifs version 1.52 or better (according to the MAN page).

It's unclear to me though whether mount -t cifs actually utilises the underlying samba machinery, or whether it's a separate implementation...

According to the manpage, mount.cifs ignores the smb.conf file on the client.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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