LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   enforcing unix permissions on directories (http://www.linuxquestions.org/questions/linux-security-4/enforcing-unix-permissions-on-directories-775745/)

goncalopp 12-15-2009 04:10 AM

enforcing unix permissions on directories
 
Hey guys, I'm a bit stuck on this one..

Is there a way to force a directory's group permissions to its childs?

i.e.: directory1 is owned by user1, and has group group1, with 770 permissions. Is there a way to ensure that user2 (which also belongs to group1) cannot create files under that directory set to any group other than group1?

Is this possible with the unix permission model?
Or maybe with ACLs?

chrism01 12-15-2009 06:36 PM

chmod +s dirname

sets the sgid bit on the dir; all files created in there will be (group) owned by the dir's group.
See also chgrp.

goncalopp 12-16-2009 08:52 AM

That's exactly what I was looking for. Thanks!


All times are GMT -5. The time now is 01:41 AM.