You are not logged in.

#1 2008-11-29 06:58:37

mr_chapendi
Member
From: Vanderbilt University, TN
Registered: 2008-08-06
Posts: 3

Samba and Permissions

I'm trying to set up a folder on the house server that anyone with a username and login can access.  Ideally, files and folders inside said shared folder would belong to the user that created them, but anyone should be able to modify and/or delete them.  This works just fine with files in the root of the share.  Unfortunately, if I create a folder and create items inside it, they are owned by me with full priveliges, while other users have read-only access only.  How do I set the permissions on this folder so that a member of the group 'users' can do anything they want inside this share?  I've already tried a staggering variety of chmod's and chown's to no avail.  I'm sure the answer is really simple.

Thanks.

Offline

#2 2008-11-29 07:20:13

shazeal
Member
From: New Zealand
Registered: 2007-06-05
Posts: 341

Re: Samba and Permissions

Mount the disk that contains the share with bsdgroups option. Set chmod +s on the root of your share. Set the group for the share to users or some other group that anyone accessing it will have.

/dev/sdc1 /mnt/share ext4 defaults,noatime,bsdgroups 0 1
chmod +s /mnt/share
chown -R root:users /mnt/share

Offline

#3 2008-11-29 07:24:53

shazeal
Member
From: New Zealand
Registered: 2007-06-05
Posts: 341

Re: Samba and Permissions

You will also need to set your umask to 0002 or something like that, man umask first though, that may not be what you want exactly smile

Offline

#4 2008-11-29 08:02:45

attila
Member
Registered: 2006-11-14
Posts: 293

Re: Samba and Permissions

Working with chown and chmod is only the half of the story because you have to tell it for the share volume too.

Example for the smb.conf of your house server:

[usershare]
comment = share for the users group
path = /PATH/VOLUME
writeable = yes
valid users = +users
create mask = 0660
directory mask = 0770

You have to control if the gid of the group users is everywhere the same.

Offline

Board footer

Powered by FluxBB