Want to add some more things to what Nixcraft said.. though they are complex but worth to know..
as Nixcraft said to set 2775 permissions, this permissions have two limitations
1)These permissions will not be set to sub directories/files..
so better do..
2)You should know that chmod will change the permissions to present and existing directories/files not for the folders/files going to be created in that directories ie.. for new files created in this directories these permissions will not take effect..
chmod -R 2775 /path/to/folder
So what to do for applying these permissions to new files/folders going to be created in that?
we should use acls for this and set umask as
Note:inorder to set ACLs acl should be enabled on the partitions..
setfacl -d -m mask:007 /path/to/dir
Please correct me if I am wrong..