Possible Duplicate:Make all new files in a directory accessible to a group I have a directory in which collaborative files / directories are stored.  Say directory abc is owned by root and the group is project-abc.  I'd like for this directory to have the following:Only members of group project-abc are allowed to change the contents of this directory.Files added to abc must have read and write permissions set for members or group abcDirectories added must have read, write and execute permissions for group abcThis is straightforward for static directories, but the contents of this directory are expected to change quite often.  What's my best approach to producing the desired result? 
How do I set permissions for a directory so that files and directories created under it maintain group write permissions?
linux;permissions;group
The best thing you can do is to add the setgid bit (chmod g+s) to your directories. See Directory Setuid and Setgid in the coreutils manual. New directories will then preserve group ownership.As for permissions, the best you can do is make sure umask 002 is in use every time someone works inside this directory.(Yes, basic unix-style permissions are too basic sometimes I don't know if ACLs can make collaborative work inside a directory easier. If they are activated in your system, you might have a look.)