A class directory may be used by an instructor to facilitate submission of assignments. The instructor sets up a class directory for each course taught, with a subdirectory for each student in the course. When the ACLs (access control lists) are properly set, the students may deposit assignments (in electronic form) but may not look at the work of other students nor change their submissions. This allows the instructor to look at all the work and add comments and grades to the students' files. The class directory approach will be illustrated with an example. In the home directory of an instructor (smith) we will create a directory for the class ENGR1101 and subdirectories for each student in the class. The directory structure looks like this:
smith -| |- ENGR1101 -| |- bob |- jim |- barb |- sam |- jan |- dave
Start --> My Computer --> Right click on AFS Unix Drive(U:) --> Select AFS --> Select Access Control Lists
Click Add --> Enter "system:authuser" for name --> Set permissions to "l-Lookup" --> Leave as normal entry --> Click OK --> Click OK
Enter the AFS Unix Drive(U:) --> Create new folder --> Rename folder (Class Name And Number, example: ENGR1101)
Right click on the new folder --> Select AFS --> Select Access Control Lists
Select "system:authuser" when the Set AFS ACL Window appears --> Set permissions to "r-Read" and "l-Lookup" --> Click OK
Enter the folder with the class name and number --> Create another new folder --> Rename folder (Student Name or ID, example: bob)
Right click on the folder with the student name or ID --> Select AFS --> Select Access Control Lists
Click Add --> Enter student's Mosaic ID for name --> Set permissions to "r-Read", "l-Lookup", and "i-Insert" --> Leave as normal entry --> Click OK --> Click OK
The following commands can be used to create the directory structure shown above and set the ACL permissions: % cd (This puts you in your home directory.) % fs setacl . system:authuser l (This gives everyone look access to your home directory. There are spaces before and after the dot (.), which indicates the current directory.) % mkdir ENGR1101 (This creates the ENGR1101 directory.) % fs setacl ENGR1101 system:authuser rl (This gives everyone read and look access to your ENGR1101 directory.) % mkdir ENGR1101/bob (This creates a subdirectory named "bob" in the ENGR1101 directory. This should be repeated for each student.) % fs setacl ENGR1101/bob bobsid rli (This gives the individual student read, look, and insert access in the subdirectory named "bob." Here, "bobsid" is the user id for the student with access to the subdirectory.)
The following C shell script may help in setting up the class directories ACLs. Name the script "Dsetacl" and use as instructed.
#!/bin/csh echo Directory setacl # # set ACL for all subdir below the current # to the permissions given # # Create a dir. of sub-dir that have account names for sub-dir names. # Example: Class # user1 user2 user3 user4 user5 user6 # # cd Class # 0setacl rli # This will set all sub-dir (assumed to be account names) to # have read, look & insert premmissions for the user # foreach i (*) fs setacl $i $i $1 echo " Setting permission for "$i" to "$1" in sub-dir" echo end