UNIX Groups


Sharing of accounts is never permitted.

Therefore, for classes that require group work, the CSE IT staff will create Unix groups for each project group.

The way to use groups is to:

  • chgrp the files and/or directories involved in the project to the correct UNIX group.
  • Set permissions to something like 770 for directories and 660 for files. That way, the group members all have read and write access to the files, but they will be closed to everyone else.
  • Do chmod g+s on the directory so that files created inside the directory will inherit the group from the directory, rather than from the person creating the file.

Other useful commands/hints:

  • Your umask sets a mask for the permissions on newly created files. The default is 077, which makes new files be closed to group and other. You might consider doing "umask 007" when working on group stuff, so that files will be created group readable and writable (or "umask 27" to make them group readable, but not writable). (But only do that when you work on group project stuff, and do "umask 77" when you're done.)
  • As an alternative to changing your umask, you can use access control lists (ACLs) to fake it for you. On the directory that you want to be group-writeable, do:

    % setfacl -m d:u::7,d:g::7,d:m:7,d:o:0 directory

    ... which will essentially set a umask for that dir of 007 (user and group rw, nothing to the world).

  • Display group ownership of all files in a directory:

    % ls -lg

  • List groups that you belong to:

    % groups

  • Consider using RCS to handle the file sharing within your group. See the rcsintro(1) man page for details.


  1. Sharing accounts is not permitted. If we find users logging into other users' accounts, we will deactivate all accounts involved in the sharing.