0

Before I begin I should note that what I'm asking for was working perfectly with the "vers=1.0" flag added to mount.cifs. But after an OS upgrade on the server, which upgraded samba to Version 4.13.17-Ubuntu, this is apparently no longer supported.

Also note that there is NO Windows involved in this - I am only dealing with linux user, group and permission information.

I have an Ubuntu 20.04 server running smbd and sharing a /data volume, and an Ubuntu 20.04 client mounting that share with mount.cifs. On the client, ls -l shows everything owned by root/root:

# mount.cifs //server/data /data -o username=username,password=password
# ls -l /data
total 0
drwxr-xr-x 2 root root 0 Mar 29 14:07 directory-a
drwxr-xr-x 2 root root 0 Feb 13 16:43 directory-b
drwxr-xr-x 2 root root 0 May 17  2012 etc
drwxr-xr-x 2 root root 0 Apr 21  2014 lost+found
drwxr-xr-x 2 root root 0 Feb 13 16:43 shared

What I want is to get the client side to see the same users, groups and permissions that are on the server, for example:

server# ls -l /data
total 0
drwxr-xr-x 2 fred fred      4096 Mar 29 14:07 directory-a
drwxr-xr-x 2 barney barney  4096 Feb 13 16:43 directory-b
drwxr-xr-x 2 wilma wilma    4096 May 17  2012 etc
drwx------ 2 root root     16384 Apr 21  2014 lost+found
drwxrwxr-x 2 fred users     4096 Feb 13 16:43 shared

All user and group accounts exist and have identical UIDs and GUIs on both systems (as I said above, this all worked fine before). Here is the old fstab entry that was used on the client before the server upgrade:

//server/data  /data  cifs _netdev,username=username,password=password,noexec,noacl,vers=1.0 0 0

This now gives an error:

# mount /data
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

and removing the "vers=1.0" flag fixes this error but has the result seen above (loss of all user/group/perm info).

smb.conf on the server contains:

[global]
    workgroup = WORKGROUP
    server string = Server
    log file = /var/log/samba/log.%m
    max log size = 1000
    logging = file
    panic action = /usr/share/samba/panic-action %d

    server role = standalone server
    passdb backend = smbpasswd
    obey pam restrictions = no
    unix password sync = no
    pam password change = no
    map to guest = Never

    # defaults for shares
    guest ok = no
    create mask = 0775
    directory mask = 0775
    case sensitive = yes
    map archive = no

[data]
    comment = Data
    path = /data
    writeable = no
    browseable = yes
    write list = fred

The Question

Is there any way to get the old vers=1.0 behavoir with the newer version of Samba? Thanks!

4
  • What I don't understand: If you have a UNIX/Linux environment only, why are you using CIFS and not NFS?
    – U. Windl
    Apr 5, 2022 at 9:32
  • I tried NFS years ago and can't rememeber if there were other problems, but the main thing is that it hangs the client machine if the file server is down. On my desktop this is pretty rare, but the other wrinkle is laptops. Is it possible to make NFS play nice with servers that are not always available?
    – Kruthers
    Apr 6, 2022 at 13:27
  • Try searching for "NFS soft mount" (also man 5 nfs).
    – U. Windl
    Apr 6, 2022 at 13:35
  • @U.Windl - thanks for the tips! I do want to give NFS another try so I'll take your advice when I have some time
    – Kruthers
    Apr 7, 2022 at 14:52

1 Answer 1

1

Well I finally found it. Adding this to smb.conf allows the vers=1.0 option to be used again:

server min protocol = NT1

I found it in an obscure bug report: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1883234

Unix extensions only work for the SMB1 protocol, which has been deprecated and is no longer used by default. Development is ongoing to support them in SMB3.

You can re-enable SMB1 by adding this to [global] in the server's smb.conf:

server min protocol = NT1

Can you please try again with the above setting and report back?

Also there is a new side effect when listing directories, an extra + (plus sign) in the permissions field that was not there with the previous version. It looks like this:

# ls -l /data
total 0
drwxr-xr-x+  2 fred   fred      4096 Mar 29 14:07 directory-a
drwxr-xr-x+  2 barney barney    4096 Feb 13 16:43 directory-b
drwxr-xr-x+  2 wilma  wilma     4096 May 17  2012 etc
drwx------   2 root   root     16384 Apr 21  2014 lost+found
drwxrwxr-x+  2 fred   users     4096 Feb 13 16:43 shared

I can't find any documentation about it but it seems to correspond to files & dirs that I have write permissions to.

1
  • Agreed, the documentation is poor (I couldn't find it), but the magic word is "ACLs".
    – U. Windl
    Apr 6, 2022 at 13:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .