I have a file that a colleague and I are editing together, on a unix system. We are using unix group permissions to edit it. We have one unix group that we are both members of. Whenever I save the file, it changes the unix group to one that he is not a member of. Is there any way to stop it from doing that?
OK, default dot files set by our sys admins use a umask of 022. What's a good umask for "don't change it!"?
asbruckman
2009-03-13 14:22:21
umask is for default permissions, not group ID.
moonshadow
2009-03-13 14:33:03
+2
A:
Your options are to set the sticky bit on the directory to force files within it to match its group ID, or to use newgrp(1) to open a shell with the desired group ID before editing the file.
moonshadow
2009-03-13 14:14:26
A:
One option is to switch group using the command newgrp. It may ask for the group password that you may set with gpasswd.
jassuncao
2009-03-13 14:24:53