[Samba] Problem with subfolder permissions within share

Mark Adams mark at campbell-lange.net
Wed Apr 11 13:54:32 GMT 2007


Further to the below, you will want to use

create mask = 774
directory mask = 2775 

> 
> Hi Jethro,
> 
> Please make sure when you reply to mailing list messages that you 'Reply
> All' as the information may be useful for other users if they have
> similar issues.
> 
> To answer your question, No i'm not talking about adding an extra entry
> in the smb.conf, as it is in the same container as your first share it
> would still be visible even if you did this.
> 
> I am talking about setting the folder permissions in linux. You can do
> what you are asking effectively using groups.
> 
> I suggest you do the following;
> 
> Create 2 groups on your linux server; group1 and group2
> 
> Add user1, user2, and user3 to group1.
> Add user1 and user3 to group2.
> 
> Change your smb.conf config for "test" so it has 
> 
> valid users = @group1
> 
> using the @ sign means it will allow the people in that group, rather
> than having to add multiple users
> 
> Then set the perms (chmod) on the "test" folder in the filesystem to 2774
> (the 2 is important as this sets "SGID or Set group id" this will
> ensure any files created in this folder, no matter by what user, will
> always set the group)
> 
> Change the group ownership (chgrp) recursively to group1 for "test"
> 
> cd in to "test" and change the group ownership of "subtest" to group2
> 
> Set the perms of 2774 for the "subtest" folder.
> 
> Once this is done it should work as you desire, if user1 or user3 logs
> in, they will have access to all folders. If user2 logs in, they will
> not have access to "subtest".
> 
> I would recommend you read a bit more about linux if you intend to use
> it. Especially about permissions, see the following link for more
> information;
> 
> http://www.zzee.com/solutions/linux-permissions.shtml
> 
> Regards,
> Mark
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/listinfo/samba


More information about the samba mailing list