Storing Project Artifacts

Please read the following instructions carefully.

Quotas

The quota for all the students in the class has been set on the /home/scf-team partition, which is accessible on all SCF timesharing hosts and workstations. You will be writing your project artifacts to the csci577 directory on that partition, which is owned by csci577 and is only user-writable but is world-readable and world-searchable. Your quota on the /home/scf-team partition is separate from the one your home directory.

Team Directories

Accessing Your Team Directory

- There are sub-directories under /home/scf-team/csci577, one for each team.  These subdirectories are owned by csci577. We already set them up such that access to a team directory is limited to only team members.
- If you were teamX (X = 1,2...16,17,...,21)in CSCI 577a, you are now teamXb.
- You should keep all the csci577 project-related artifacts on the allocated space.
- Do not keep personal files on the class account, since it will be periodically inspected
- At the end of the semester, we will take ownership of all the files on that partition

You can access your team directory by doing:
% cd /home/scf-team/csci577/teamXb
or
% ~csci577/www/teamXb
(~csci577/www/teamXb is a symbolic link to the actual directory /home/scf-team/csci577/teamXb)

Access Your Team Directory from the Previous Semester

If you were in Team X, you can still access the directory teamX. However, you no longer have the permissions to modify any of the files. You do have the permission to read the files. Thus, you can copy any files that you want to have copied over to your new team directory teamXb.

Team Permissions

All members (assuming that MX1, MX2, MX3, etc... are their usernames on the SCF hosts) of teamX have been given rwx permission to the teamXb directory, using the setfacl command, executed by owner csci577:
setfacl -r -m user:MX1:rwx teamXb
setfacl -r -m user:MX2:rwx teamXb
setfacl -r -m user:MX3:rwx teamXb
...
- So now, team members (MX1, MX2, MX3, etc...) can create sub-directories or files under the team directory (teamXb)

Creating a sub-directory

Team member MX1 creates a sub-directory temp under teamXb. The permissions would be:
drwx------ MX1 512 Oct. 17 temp

If team member MX1 wants team member MX2 and MX3 to have access to this directory, member MX1 has to give them permission (assuming rwx permission for MX2 and r-- permission for MX3):
setfacl -r -m user:MX2:rwx temp
setfacl -r -m user:MX3:r temp

then the access would look like (note the + sign):
drwx-------+ X1 512 Oct. 17 temp

Now if team member MX1 creates a file OCD.html in temp and team member MX2 creates a file SSRD.html in temp then team member MX1 needs to do:
setfacl -r -m user:MX2:rwx OCD.html
setfacl -r -m user:MX3:rwx OCD.html

and team member MX2 needs to do:
setfacl -r -m user:MX1:rwx SSRD.html
setfacl -r -m user:MX3:rwx SSRD.html

so that all three team members (MX1, MX2 and MX3) can now edit the file.

File Permissions

Note that all students in the class are in the same group. So, if you set the permissions to your files to rwx (for group) using (chmod), then any student in the class will have rwx access to your file.

For a file to be readable by the HTTP server (running on nunki.usc.edu at port 8082), you need to set the permissions to rwxr-xr-x. You can do that by running:
chmod 755 filename

The csci577 account administrators (currently the Teaching Assistant) are responsible for the administration of the web server. So, if you notice that the web server is down, please send email to the Teaching Assistant.

You can find out more about the setfacl and getfacl commands by doing man setfacl or man getfacl (ACL stands for Access Control List). Also, you can find out more about the chmod command by doing man chmod

Troubleshooting File Permissions

If the Web server cannot access any file in the dirname directory and returns 'File Not found' error, even though it appears as if the permissions are correctly set to rwxr-xr-x, you may have incorrectly specified permissions.

1. Look at the permissions of the directory dirname

getfacl dirname
# file: dirname
# owner: username1
# group: csci-577
user::rwx
user:username1:rwx         #effective:rwx
user:username2:rwx         #effective:rwx
user:username3:rwx         #effective:rwx
user:username4:rwx         #effective:rwx
group::---              #effective:---
mask:rwx
other:---

For the directory to be accessible by the web server, you need to have group::r-x

2. The solution is to execute (in the parent directory)
setfacl -r -m group:csci-577:r-x dirname

Note that the problem seems to happen whenever you create a directory, set the ACL, and then try to do the chmod. You may prevent the problem from happening by:
1. Creating the directory (mkdir dirname)
2. Setting the permissions for the Web server  (chmod 755 dirname)
3. Set the ACLs for the files in the directory to give specific rwx access to your team members,
e.g., setfacl -r -m user:username2:rwx dirname

Directory Structure

Under your team directory, you have to set-up a directory structure as indicated in the guidelines. Failure to do so will result in severe penalties. Also remember NOT to delete any project artifacts. Teams who do not have a complete set of project artifacts will be penalized, as they do not have the excuse of running low on disk space.