This document show you how to make a directory and share with member of your project in /common/user/shared/GROUPNAME. (Note that GROUPNAME should be replaced by the group name of your choice) Please note that any files you stored, counts against your /common/users/NETID 100GB quota.
1. Create Appropriate Groups
You’ll need to create a user group for your team. You can pick the name of the group. Please don’t use names starting with any of the following.
login disabled slide cs dept If you do, our software may take it over without warning you, and drop you and your members.
Recommendations for group names. (You can probably use some others, but these are safest.)
- Must start with a-z or _
- Characters after the first may also be digits or hyphen
- No longer than 32 characters
Here are the most common operations on groups with group name GROUPNAME using command lines.
• Create group:
ipa group-add GROUPNAME
• Delete group:
ipa group-del GROUPNAME [you’ll get an error message, but the deletion still happens]
• Add someone to the group (don’t forget to add yourself):
ipa group-add-member GROUPNAME --users=NETID
• Remove someone from the group:
ipa group-remove-member GROUPNAME --users=NETID
• To look at the group and its members:
ipa group-show GROUPNAME
• To see what groups you are in:
groups [if you add someone to a group, they won’t see it until the next time they log in]
• Another way to see information about yourself:
ipa user-show NETID [this may show groups that the
groups command doesn’t, because some groups are in effect invisible]
2. Making Shared Directory
Once you have a group for your team, here are the commands to make a shared directory. We have allocated a directory for filesharing at /common/users/shared to simplify the process. We recommend you name the directory the same as your GROUPNAME. Here are the steps:
chgrp GROUPNAME /common/users/shared/GROUPNAME
chmod 2770 /common/users/shared/GROUPNAME
Here’s what the commands do:
mkdir command makes the directory in /common/users/shared with a name “GROUPNAME”
chgrp command sets it so your group has access to /common/users/shared/GROUPNAME directory.
chmod command sets the permissions to let members of your group look at, create, and delete files in the directory. The leading 2 makes sure that any files or subdirectories created inherit the group.
Verifying what was done using
ls -ld, the output should look like this:
drwxrws--- 2 NETID GROUPNAME 10 Sep 25 14:04 /common/users/shared/GROUPNAME/
drwxrws---which gives GROUPNAME directory full access to GROUPNAME members.
3. Setting Access to File Inside Shared directory
Now any file you created in /common/users/shared/GROUPNAME will be visible to GROUPNAME but it does not mean the file is readable or writeable to your group members. If you need everyone in the GROUPNAME to be able to read/write the file, you’ll have to make sure GROUPNAME can do so. E.g. suppose you want an existing file /common/users/shared/GROUPNAME/file2share be set so that GROUPNAME member can read/write it, do the following:
chmod 660 file2share
ls -l . The output should look like this:
-rw-rw---- 1 NETID GROUPNAME 175 Sep 7 12:52 file2share
The critical part of the output is the second “rw”. That applies to other members of your group. The last 3 characters “—” is for people not in your group who completely have no access to the file..
4. Accessing Files inside Share Directory
Now that you have created a shared folder, members of GROUPNAME can access the files inside /common/users/shared/GROUPNAME using the following command: