Setting up a Directory for Class

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
        
The ACL for the directories must be set properly for this approach to work. There are some options, but in general the students must have ACL permissions to copy their work into their subdirectory of the class directory, but not to look in the other subdirectories. The ACL of the instructors home dir (smith) should allow the group system:authuser at least look (l) access. The group system:authuser includes all authenticated users on the system. As an option the instructor could create an ACL group using pts commands and give this smaller group look access in the home directory.

The class directory should have read and look (rl) access for system:authuser or for the ACL group. The individual subdirectories must have read, look, and insert (rli) access for the individual only.

This will allow the students to copy files into the class directory but not allow them to make any changes after doing this. The instructor should have all (rliwdka) access to each directory. This will allow the instructor to edit the files the students turn in, allowing the addition of grades and comments. The students may then read the edited files for comments and grades, but cannot make any changes.


  1. Setting up a Directory for Class in Windows.
  2. Setting up a Directory for Class in Unix/Linux.

Windows Setup

  • Start --> My Computer --> Right click on AFS Unix Drive(U:) --> Select AFS --> Select Access Control Lists

    1
  • Click Add --> Enter "system:authuser" for name --> Set permissions to "l-Lookup" --> Leave as normal entry --> Click OK --> Click OK

    2
  • Enter the AFS Unix Drive(U:) --> Create new folder --> Rename folder (Class Name And Number, example: ENGR1101)

    3
  • 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

    4
  • 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

    5
  • 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

    6
    This gives the individual student read, look, and insert access to a directory designated for that student.

Unix/Linux Setup

Note: To access your home directory under Unix, type 'cd' in the Terminal window, and for Linux, type 'cd ..' in the Terminal window.

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