4

I have Ubuntu 16.04 running a samba server and another 16.04 box that mounts it without issue using the fstab line //192.168.0.102/share /mnt/raid cifs user=myuser,pass=mypass. When I mount the share, the files all show the proper user/group and when copying files to the share, the mode (ie 0644) is preserved.

With a different machine running Ubuntu 17.10, the same fstab line causes the mount to list everything on the share as user/group root:root instead of myuser:myuser. I can force the user/group to be correct by adding uid=1000,gid=1000 to the fstab line but when copying files to the share, the permissions are no longer preserved (they all show up as 0755).

Any ideas on what has changed that might be causing this issue and how I can fix it would be appreciated. This samba share has worked correctly for me across multiple versions of Linux so I'm fairly certain the issue is on the new Ubuntu 17.10 side but I not certain if it's a change in the security policies or something in the cifs library itself.

0

1 Answer 1

4

They've changed the default dialect to SMB3 in mount.cifs. Originally it defaulted to SMB1. To get get the same behavior as Ubuntu 16.04 you add vers=1.0 to the mount options. With this option present, I now get the correct user/group and permissions are preserved when copying.

1
  • for me the the following fstab line: //192.168.0.2/proj /mnt/otthon/proj cifs noauto,credentials:=/home/mark/.ssh/OpenWrtCIFS,users,_netdev,uid=mark,users 0 0 complains error(22): Invalid argument for Ubuntu 17.10 In 16.04 it was working properly. Unfortunately vers=1.0 did not help.
    – V-Mark
    Dec 11, 2017 at 20:36

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.