Linux – Clients can’t create symlinks on Samba share

linuxnetwork-sharessambasymbolic-link

As recommended in many answers to questions about samba shares and symlinks, I have tried explicitly enabling "follow symlinks" (although documentation says it is on by default) as well as enabling "wide links" and "allow insecure wide links" (although these are related to symlinks that point to outside the shared folder and not turning symlinks on or off)… Symlink creation has not been enabled by modifying these settings.

Samba share is served from a Debian 8 host and accessed from a Debian 9 client.

This is an example of the output I get when attempting to create a symlink in a mounted share:

$ touch hello.txt
$ ln -s hello.txt hello.sl
ln: failed to create symbolic link ‘hello.sl’: Operation not supported

I have run out of ideas and search results, so any input is welcome.

EDIT 1:

Host smb.conf:

[global]
security = USER
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
server min protocol = SMB2
client min protocol = SMB2
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb

[share_name]
path = /path/to/folder
force user = hostusername
force group = hostgroupname
read only = No
force create mode = 0660
force directory mode = 0770
case sensitive = Yes

Client mount command:

sudo mount -t cifs //ip.add.re.ss/share_name /path/to/mount -o username=hostusername,vers=3.0,uid=clientusername,gid=clientgroupname,soft,rsize=8192,wsize=8192

Best Answer

Thanks to @grawity for hinting that my problem might be related to the protocol version. I found a solution that enable symlinks with SMB3 by adding the mfsymlinks option to the mount command like so:

sudo mount -t cifs //ip.add.re.ss/share_name /path/to/mount -o username=hostusername,vers=3.0,uid=clientusername,gid=clientgroupname,soft,rsize=8192,wsize=8192,mfsymlinks

I don't fully understand the difference between a normal symlink and the Minshall+French symlinks, but it appears to work for my case.

Sources:
https://www.systutorials.com/docs/linux/man/8-mount.cifs/
https://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks).

Related Question