How do I change the default group upon file modification and creation?

You can set a directory to a group and then set the "setgid" bit on that directory. Then, anything created or modified in that directory will automatically be set to that group.

To set up a directory "project" for the group "ourgroup" to use, from the command line you would:

% chgrp project ourpgroup
% chmod g+s ourpgroup

You can set your umask to 007, and then all files that you create will have group read/write permission. This is safe because all files that you create are by default in a group that no one else is in. More information on umask is available here.

You can put the umask command in your .bashrc file, so that it gets set in every window.

If you combine these two, then all files created in your myproject directory will be readable and writable by everyone in group "foo", and all of your other files will be safe.

Note: For information on logging into Eniac, please see "How Do I Log Into Eniac?"

© Computing and Educational Technology Services