Next: Getting Help
Up: Sharing Files on RCS
Previous: Using the chmod Command
Subsections
AFS also allows you to create groups, or defined lists of users on which you
can place an ACL, for easy filesharing among several people.
For example, if you're working on a project with a group of Rensselaer
colleagues, you can place all of their Rensselaer userIDs in a group,
and then grant or deny them the same directory access rights all at the
same time. This saves you the trouble of having to change each group
member's ACL entry individually.
If you wish, you can use a group for your own convenience,
without telling people that they are in a group. In this way,
you can control the group's access to files in a directory,
and the other users only know that they can or cannot access certain
files. However, users can always list group members.
On the other hand, you can also create a group and
then inform its members that you have included them in that group.
In turn, the group members can add the group's name to their
own ACLs to allow all the group members file access.
However, if you are in a group that someone else has created,
and you have added the group to an ACL, you should know that
the group's owner can add other people to the group without
informing you. These new group members will automatically have
the same access to your files that the other group members do.
When you create a group, you are the owner, and this means that
only you can administer the group; that is, you are the only one who
can add or remove members, rename or delete the group, etc.
However, anyone can see that a group exists, since it will appear in the ACL
whenever they issue an fs la command. (By default, anyone can list the
members of a group.) More information about groups and
protecting group information follows.
To use a group, you must:
- 1.
- create a group
- 2.
- assign members to the group
- 3.
- set an ACL entry for the group
In order to work with a group, the first thing you need to do is create one.
Most of the group-related commands use the pts
command, which tells AFS to use the protection server
to check directory access permitted to group members.
As an example, suppose you want to create a group with your project team
members in it.
The basic command format to use is:
where
- yourid refers to your own Rensselaer userID
- groupname refers to the name you wish to give the group
As a general rule, group names have two parts, separated by
a colon, with the first part containing the owner's name, and the
second part containing the group's name. All letters must be
lowercase; you can include numbers and punctuation, except
for the colon. The total name (userID and group name) may
contain as many as 63 characters.
As an example,
suppose your own userid is doej2. To create a group called
doej2:team, you would enter the pts command shown below:
Each group is assigned an id-number.
It's important to note that a newly-created group is empty, so, once you
have created a group, your next step is to add users to it.
To add users to a group, use the following command format:
where
- useridi1, userid2, and userid3 refer to the Rensselaer
userIDs of the users you want to add to the group
- yourid refers to your own Rensselaer userID
- groupname refers to the name of the group to which you want to
add members
As an example, to add three members to the group team, you would enter
the following command:
Setting the ACL entry for a group gives the members
specified access to the files in that directory. The command for setting a
group ACL entry, which is very similar to that
for an individual user,
uses the following format:
where
- directory refers to the directory to which you want to give the
group access
- yourid refers to your own Rensselaer userID
- groupname refers to the name of the group
- rights may consist of any combination (or shortcut) of rlidwka
access rights
For example, to give the group team write access to the math
directory, first make sure you're in math's parent directory, and
then issue the following command:
You can then use the following fs la command to check the results:
To list group members, use the following command format:
If you wish, you may use the abbreviation mem instead of
membership.
For example, to see the members of doej2:team, enter the following
command:
To see a list of the groups to which you belong, use the following command
format:
Example:
In addition to the groups listed, you are always a member of
system:anyuser and, if you are logged on, a member of
system:authuser.
To remove a user from a group, use the following command format:
If you want to remove a person from more than one group,
add the -group option just after the userID of the person you
want to remove, and add other group names to the end of the
command.
Examples:
To remove the member ramabz from the group team:
To remove the member ramabz from the groups team
and dept:
-
- pts removeuser -user ramabz -group doej2:team doej2:dept
Removing a group requires two separate actions: you must first delete the
group, and then remove its ACL reference.
To delete a group, use the following command format:
To then remove the group's ACL reference:
where directory refers to the directory containing the
ACL from which you want to remove the group.
The system will automatically show you an updated ACL
for the directory.
For example, to delete the group doej2:team, you would enter the
command:
To then remove the group from the math directory's ACL:
The system will then show you an updated ACL like this:
Next: Getting Help
Up: Sharing Files on RCS
Previous: Using the chmod Command
Send comments to consult@rpi.edu.