UB Information Technology


Working in Groups

In many organizations, there will be more than one person responsible for placing files in their Central Campus Web Hosting Server area. Even though only one person can be the official owner of the area, this can be done through the use of Unix groups.

In Unix, file permissions (read, write, and execute) are assigned to three sets of users: the owner, the group, and the world. When you create or place a file in your directory, it is automatically assigned to you as the owner, and to your default group (e.g., ABC Staff, ABC Faculty, ABC Undergraduate, or ABC Graduate). While you have write permission on that file, the world does not, and usually, neither does the group. You can give the group write permission using the chmod command:

chmod g+w filename

Where filename is the name of the file or directory you want to change (including wildcards or for the current directory).

The other problem is that quite often, not all the people who work on the area belong to the same group (e.g., SA's belong to a group for their major). The best thing to do is to request a new Central Campus Web Hosting Server group by filling out the groupaccess form. A group with a prefix of uw- (e.g., uw-abc) will be created, which you can then assign to the directories and files you create with the command:

chgrp uw-abc file

You should probably use these two commands to assign group permissions to your directory, and all of the files currently in your area:

/util/gnu/bin/chgrp -fR uw-abc .
/util/gnu/bin/chmod -fR g+w .

chgrp - change group
chmod - change permissions
- options for the command.
f - suppresses most errors messages.
R - tells the commands to not only change the present directory, but all the files and subdirectories it contains as well.
uw-abc - a group, use the group associated with your site.
g+w - group add write, adds group write permissions.
"." - perform this command at this directory.

You will need to continue to use the two commands on the new files you create, so they also have the necessary permissions.

NOTE: to modify group file permissions you must be a member of the group. To find out what groups you currently belong to, follow this link.
(a valid ubitname and password is required)