Operating System - Linux
1829403 Members
1845 Online
109991 Solutions
New Discussion

Re: samba file permissions

 
SOLVED
Go to solution
steven Burgess_2
Honored Contributor

samba file permissions

Hi everyone

I have a samba file share with the following permissions

[data]
comment = Red2 Data
path = /data/red2data
read only = No
create mask = 0775
force group = red2
force directory mode = 775
force create mode = 775
guest ok = Yes

Within /data/red2data I have a directory 'Reference Library' with the group ownership of management (manually changed). However, when a member of the management group creates a new folder within 'Reference Library' The directory group ownership is red2 (as in the configuration). How can I ensure that all newly created directories with 'Reference Library' are created with the management group ? I do not want to change the 'force group' option for the share as there are a large number of directories that need the red2 group.

My thoughts are that I need to create a new share of 'Reference Library' with a force group of management

Any ideas ?

TIA

Steve
take your time and think things through
3 REPLIES 3
Steven E. Protter
Exalted Contributor
Solution

Re: samba file permissions

Shalom,

You can change the properties of the folder, "new folder" so that sub folders inherit permissions.

You will need to manually change ownerhip of the folder though.

You can make the folder a samba share and for that subtree override default permissions as you have done above.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Manuel Wolfshant
Trusted Contributor

Re: samba file permissions

The easiest way to force inheritance of group ownership is using chmod g+s (suid group) on the directory,
steven Burgess_2
Honored Contributor

Re: samba file permissions

Thanks

I will create a new share with a force group of management then change suid to ensure newly created files inherit the group ownership

Steve
take your time and think things through