0

I have just upgraded from ubuntu16.04 to 18.04.1

Previously I had some CIFS/SMB shares auto-mounted using autofs and one of the shares is configured on the smb server to force the user and group to "av:av"

This worked fine in 16.04 but in 18.04 the same config results in the mounted share showing all files owned by root:root even through their userid on the server is av:av (same userid exists on the Ubuntu client with the same id)

(Nothing has changed server side and other ubuntu16 machines can still auto mount the same share and get av:av ownerships)

The same problem also exists if I shutdown autofs and mount manually, so the problem is smb/cifs related not autofs related.

I can work around it if I force the dialect version in the auto.cifs mount command to be vers=1.0 like this...

av -fstype=cifs,vers=1.0,rw,credentials=/home/myuser/.smbcredentials ://fileserver/av

and the same workaround works manually like this for example...

mount -t cifs -o vers=1.0,username=myuser,password=mypassword //fileserver/av /fileserver

This therefore seems to be something to do with the smb dialect when > 1.0 on ubuntu18

Does anyone know how to fix this properly as I would prefer not to be using smb dialect 1.0 ?

Many thanks for your help/advice.

1 Answer 1

1

The Linux kernel that ships with 18.04 changed how cifs deals with the smb dialect. It used ( as in 16.04 ) to default to 1.0. Now it either has it set to 3.0 or it will negotiate the version between 2.1 to 3.0 depending on what version of the kernel you are using.

Unless your samba server is very old it shouldn't matter. If your samba server is very old then setting it to 1.0 in cifs is just setting it back to where it was in 16.04.

I'm not sure however how any of this has anything to do with the permissions the client sees from the mount. You might consider taking control of it on the client:

Remove the vers=1.0and add uid=av or uid=1000 if your uid number is 1000:

av -fstype=cifs,uid=av,rw,credentials=/home/myuser/.smbcredentials ://fileserver/av

And maybe add nounix:

av -fstype=cifs,uid=av,nounix,rw,credentials=/home/myuser/.smbcredentials ://fileserver/av

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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