It sounds like you need to set the group sticky bit on the directory with:
That causes files to keep their group ownership when changed. This is different to setting the bit on the files in that directory. Have a look at
http://rute.2038bug.com/node17.html.gz for more info on this. As an example, in my CVS repository I have several developers checking code into each directory. To keep things simple, I gave them group membership depending on the directories (corresponding to projects) I wanted them to have access to. A typical directory looks like:
Code:
drwxrwsr-x 8 cvs cvs_java 4096 2005-07-02 07:05 /usr/local/cvsrepos/java
But a file in that directory does not have the group sticky bit set, eg:
Code:
-r--r--r-- 1 cvs cvs_java 300 2002-08-12 05:31 readme.txt,v