Changing Unix group for files

Your options are to set the setgid bit (chmod g+s) on the directory to make files created within it match its group ID, or to use the newgrp command to open a shell with the desired group ID before editing the file.


One option is to switch group using the command newgrp. It may ask for the group password that you may set with gpasswd.


Uno. change your default login group number to be the same between the two people

username:x:500:514::/home/username:/bin/tcsh
# Where 514 is the group id.

Duo: create a new user id , with a password only known by the two people involved. chown the file to be owned by the new userid. Before editing the file in question, suto the new userid.

Trio:.

cp $EDITOR to $HOME; \# in this example pico
chmod g+s $HOME/pico;
chgrp RELEVANTGROUP $HOME/pico;

Quattro:

sudo chgrp RELEVANTGROUP some/path/to/file \# may require root

Cinco: Create a few Google account and edit the thing SIMULTANEOUSLY in Google docs. (it is neat to watch where the other person is typing). Make a point of changing the sharing perms in Google Docs for "anyone with the link"

Hexo: Split the file in two and have each editor only work on half.