Storing Project Artifacts
Please read the following instructions carefully.
Quotas
The quota for all the students in the class is now 50 MB 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.
- Now, you should move and keep
all the csci577 project-related artifacts on the newly 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
- There are 20 directories name teamXa (X = 1,2...16,17,...,23).
You can access your team directory by doing:
% cd /home/scf-team/csci577/teamXa
or
%
~csci577/www/teamXa
(~csci577/www/teamXa is a symbolic link to the actual directory
/home/scf-team/csci577/teamXa)
Team Permissions
All members (assuming that MX1, MX2, MX3, etc... are
their usernames on the SCF hosts) of teamXa have been given rwx permission to
the teamXa directory, using the setfacl command, executed by owner
csci577:
setfacl -r -m user:MX1:rwx teamX
setfacl -r
-m user:MX2:rwx teamX
setfacl -r -m user:MX3:rwx teamX
...
- So now, team members (MX1, MX2, MX3, etc...) can create sub-directories or
files under the team directory (teamX)
Creating a sub-directory
Team member MX1 creates a sub-directory
temp under teamX. 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 (see below), you need to set the
permissions to rwxr-xr-x. You can do that by running:
chmod 755
filename
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
Version Control
Now that team members can now have access to each
other's document, make sure that you do not overwrite each other's changes to
the various documents, which may lead to a lot of wasted time and effort. You
can follow a simple configuration management scheme, make up your own or use any
version control tool that you may have available (no support provided for any
such tool)..
Simple Version Control
If you are still working on a document, and are
not done with it yet, you can set read-only permission to your team members.
Once you are done with your changes, and want to allow your team members to
modify the document, you can give them read-write permissions to it.
When a
document has read-write permissions, you might run into the problem of having
two team members download their copy of the document, work on it independently,
and then upload it back. Only the last one uploaded will be saved, thus one team
member will overwrite the other's work. As a simple configuration management
too, if you "check out" a document (e.g., OCD.html), and you are editing
it, add some agreed-upon suffix to the filename (e.g., OCD-out.html). If
your team members notice that the file has been renamed, it's probably because
you are working on it. After you are done, upload it back, under its original
name (OCD.html) and delete (OCDout.html) or rename it to keep the
older version as a back-up in case you need to undo your changes
(OCD.bak.html)
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
anything you do for project (winwin, prototype, documents), since now you have
enough space to store everything. Teams who do not keep project artifacts (for
both the LCO and the LCA) will be penalized.
Make sure to use ONLY
relative references so that your entire team directory structure can be moved to
the archive without breaking any links. Some Web publishing tools tend to
automatically generate absolute references instead of relative ones, unless you
particularly pay attention to it.
i.e. use <ahref =
"LCO/OCD/OCD.html"> instead of <ahref ="http://www-scf.usc.edu/~csci577/teams/teamXa/LCO/OCD/OCD.html">
Team Homepage
- As indicated in the guidelines,
every team has to setup a team homepage.
- The csci577 account administrators (currently the Teaching Assistants)
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 Assistants.