1

I've installed Samba on machine msc001y. I want to access it's shared folders on msc001.

Both machines have the same users (which are mirrored on Samba)

msc (5001), james (5002), rachel (5003).

Both machines have the same groups:

grp_public (2001), grp_personal (2002)

msc, james and rachel all have access to grp_public. Only james and rachel have access to grp_personal.

I've performed:

chgrp -R grp_public /mnt/local/int001/media/public/
chgrp -R grp_personal /mnt/local/int001/media/personal/

chmod 2775 /mnt/local/int001/media/public/
chmod 2770 /mnt/local/int001/media/personal/

I've added to smb.conf on msc001y:

Within [global]

# Inherit ownership of the parent directory for new files and directories
inherit owner = unix only
# Inherit permissions of the parent directory for new files and directories
inherit permissions = yes

create mask = 0775
directory mask = 2775
force create mode = 0775
force directory mode = 2775

then within...

[public]

comment = Public Stuff
path = /mnt/local/int001/media/public
public = yes
writable = no
printable = no
write list = @grp_public, msc, james, rachel
inherit acls = yes

Before I mount [public], the mount point lists as (ie: RWX for Owner and Group):

drwxrwxr-x 2 msc grp_public    0 Jul 25 23:07 public

Once I've mounted it, it becomes (ie: RWX for Owner, RX no W for Group):

drwxr-xr-x 2 msc grp_public    0 Jul 25 23:07 public

It is mounted with:

//msc001y/public /mnt/remote/msc001y/public cifs user,nofail,_netdev,vers=3.1.1,uid=msc,gid=grp_public,credentials=/mnt/local/data/.Credentials/james.cred 0 0

If I'm loggged in as msc I get read-write as it's the owner, but if I'm james or rachel, I'm stuck with ReadOnly.

Why does the folder default to RX when I mount to it when it is RWX before?

Note: All files within the shared folder are RWX|RWX|R_X

2

You specified @grp_public, @msc, @james, @rachel in the write list. But only grp_public is a group; msc, james and rachel are users.

The correct write list should be:

write list = msc, james, rachel, @grp_public

Also see man 5 smb.conf:

write list (S) This is a list of users that are given read-write access to a service. If the connecting user is in this list then they will be given write access, no matter what the read only option is set to. The list can include group names using the @group syntax. Note that if a user is in both the read list and the write list then they will be given write access.

Default: write list =

Example: write list = admin, root, @staff

  • I've corrected this, but nothing changes. The big question is why do the permissions for GROUP change from RWX to RX when the remote folder is mounted? – aSystemOverload Jul 26 at 22:13
  • You have all kinds of funky mount.cifs parameters, such as user, uid, and gid. Please remove them and retry. Furthermore, I presume the credentials file contains only two or maybe three lines (username, password and maybe domain)? – Edward Jul 27 at 5:36
  • Funky options removed and yes credentials files has username=REDACTED and password=REDACTED... No change. – aSystemOverload Jul 27 at 19:29
  • Any other suggestions @Edward – aSystemOverload Jul 30 at 18:32
  • I've gone over it one more time, and the only discrepancy that still shows is the use of grp_media_public and grp_media_personal in the chgrp commands. Shouldn't those be grp_public and grp_personal? – Edward Jul 31 at 5:00

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.