Symlinks in samba and sshfs

Linux
Author

Vinh Nguyen

Published

March 17, 2012

When setting up sshfs mounts and Linux samba servers, one can make it so that symbolic links are followed (so they aren't broken). For sshfs, add the follow_symlinks option. In /etc/fstab/, the entry would look something like

sshfs#USERNAME@SERVERNAME: /mnt/acer fuse fsname=sshfs#USERNAME@SERVERNAME:,comment=sshfs,noauto,users,exec,uid=1000,gid=1000,allow_other,reconnect,transform_symlinks,follow_symlinks,BatchMode=yes 0 0

For samba, add the following to either the [global] options or the individual location in /etc/samba/smb.conf:

follow symlinks = yes
wide symlinks = yes
unix extensions = no

Make sure samba is restarted and the sshfs mount point is re-mounted.