I am trying to set permissions on a Samba share mounted with vers=3.0
, but it does not work (with vers=2.1
or vers=2.0
also issue is present).
As per SMB3-Linux cifsacl
option is needed for setting the permission bits, but if that option is used the folder does not mount:
# mount -t cifs //server.lan/aaditya /home/roaming/SERVER/aaditya -o 'username=aaditya,domain=server.lan,password=mypass,cifsacl,vers=3.0,nobrl,mfsymlinks,sfu,uid=1274545246,gid=1274544641'
mount error(95): Operation not supported Refer to the mount.cifs(8)
manual page (e.g. man mount.cifs)
Is there something that I am missing?
It works with vers=1.0
which has unix extensions but trying to avoid it as SMB 2.0+ seems to have much better performance and design (here and here).
Client details:
# mount.cifs -V
mount.cifs version: 6.4
# uname -srm
Linux 4.10.0-38-lowlatency x86_64
# lsb_release -ird
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Server details:
$ uname -srm
Linux 4.4.0-97-generic x86_64
$ lsb_release -ird
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
$ samba --version
Version 4.6.7-Ubuntu
Best Answer
Samba does not yet support UNIX extensions for SMB v2.0+. It is being worked on. [lists.samba.org, 10/2017]
They say that when UNIX extensions will be finalized, the Samba implementation is ”not going to allow clients to create ’real‘ symlinks on the server - only SMB-followable symlinks. Allowing clients to create real server symlinks as in SMB1 UNIX extensions has been a long-term security disaster.“ [same thread]