0

I have two machines, one host and one client, both running Ubuntu Server 18.04. The host machine has the samba server with the following config:

[data]
    comment = Data Share
    path = /path/to/data
    browseable = no
    create mask = 0770
    directory mask = 0770
    force user = dataadmin
    force group = dataadmin
    write list = @data-write
    read list = @data-write @data-read
    valid users = @data-write @data-read

On the client machine I have the share mounted with the following in the file system table:

//myserver.local.lan/data        /mnt/data   cifs    username=dataadmin,password=notarealpassword,iocharset=utf8       0       0

When I check the file permissions with a good ol' ls -al on the server it shows -rwxrwx--- which is what I was expecting, but when I check the permissions on the client it shows up as -rwxr-xr-x. How do I get the permissions to match on the client machine?

Note: I originally had set the permissions to 0775 on the host and recently changed them as an application requires 0770 for it to function. Not sure if this is relevant as the permissions on the client look like 0755

Edit

Forgot to mention what I tried so far.

  • I tried chmod'ing the files on both the server and the client
  • I tried setting unix extensions to both on and off
  • I tried using file_mode and dir_mode as described here

None of these has worked for me. After each try I either reload the smbd and nmbd services or try remounting everything. Not sure if that's enough or if I need to be doing something else on top of that.

0

I tried using file_mode and dir_mode as described here

The only problem with the link is a missing option since this is Linux to Linux.

If 770 is what you desire on the client give this a shot:

//myserver.local.lan/data        /mnt/data   cifs    username=dataadmin,password=notarealpassword,iocharset=utf8,dir_mode=0770,file_mode=0770,nounix       0       0
|improve this answer|||||
  • That did the trick, thanks! – amura.cxg Feb 6 at 20:16

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.