Section 2.0 provides some basic background information about lockers in general and describes appropriate and inappropriate uses of course lockers. This section is useful for people who have never dealt with a locker before. Section 3.0 addresses the issues of quota, access control, and locker configuration. Section 4.0 details some of the technical issues behind the way course lockers are created, allocated, and managed, and may be useful to more advanced locker maintainers. Finally, Section 6.0 addresses commonly asked questions in an easy-to-read and understand format.
This is text that the user enters.In an example which describes the syntax of a command, angle brackets (<>) denote a required parameter and square brackets ([]) denote optional parameters. In neither case should you actually type the brackets.
Many of the commands shown in this document expect to have a directory name or names as parameters. In each case, directories may be named with an absolute pathname, that is, starting with / at the top of the hierarchy, or they may be relative to the current directory.
olc at the athena% prompt or call x3-4435. The public mailing list locker-maintainers@mit.edu is for announcements and discussion relevant to people maintaining software in Athena lockers. You may add yourself to this list using blanche or listmaint, or add the discuss archive to your .meetings file by typing
am menelaus:/var/spool/discuss/locker-maintainersin discuss. (The archive may also be viewed from the SIPB WWW discuss gateway: http://www.mit.edu:8008/menelaus/locker-maintainers/).
TABLE 1.
---------------------------------------------------------------
Type Description Location in AFS hierarchy
---------------------------------------------------------------
system system files /afs/athena/system
software commercial software /afs/athena/software
user home directories /afs/athena/user
project Athena-related projects /afs/athena/project
dept Departmental leased disk /afs/athena/dept
space
org Organizations within MIT. /afs/athena/org
org lockers are typically
used for web pages
course course locker allocations /afs/athena/course
urop urop projects /afs/athena/course/urop
activity Recognized MIT activities /afs/athena/activity
---------------------------------------------------------------
The syntax of the fs lq command is
fs lq <list of directories>where <list of directories> is a space separated list of one or more directory names. Example 1 shows how to use fs lq to list the quota on the locker 25.678, if it really existed, that is.
Example 1 Listing the quota on the 25.678 locker athena% attach 25.678 attach: /afs/athena.mit.edu/course/25/25.678 linked to /mit/25.678 for file system 25.678 athena% fs lq /mit/25.678 Volume Name Quota Used % Used Partition course.25.678 15000 13016 87% 82%fs lq reports quota allocated and used in terms of kilobytes. This example locker is using slightly more than 13 MB of a 15 MB quota. (15000 KB = 15 MB). There will also be a warning indicator if the percentage used is greater than 90%, The field labeled Partition refers to the file server where this locker lives and is important only to Athena operations.
Example 2 Using du to compute disk usage athena% cd /mit/25.678 athena% du -sk Fall94 Fall95 2345Fall94 8945Fall95This indicates that the directory Fall94 is using 2.3 MB; Fall95 is using 8.9 MB.
TABLE 2.
--------------------------------------------------------------------------
File Name What Is It?
--------------------------------------------------------------------------
file~ A file ending with a tilde (~) is an Emacs backup
file.
file.o Files ending with.o are object file from compiling.
These files are used to build the actual executable.
#* Files marked for deletion by delete program
core Core files are information dumped by programs that
die ungracefully. They tend to be very large.
file.dvi, file.aux, Files ending with.dvi,.aux, and.log are temporary
file.log files created by latex.
--------------------------------------------------------------------------
The OldFiles directory is extremely useful if you accidently delete a file from the course locker. You can copy the file from the OldFiles backup into the main locker as shown in Example 3.
Example 3 Copying a file from OldFiles athena% cd /mit/25.678 athena% /bin/rm myfile oops! athena% cp OldFiles/myfile./myfile
Table 3 lists the seven types of permissions that can be given to users or groups of users.
TABLE 3.
----------------------------------------------------------------
Right Enables users to
----------------------------------------------------------------
r read the contents of files in the directory
l list the names of files in the directory
i insert files into the directory
d delete files from the directory
w write or modify files in the directory
k lock (or modify the write-mode bit) of files in the direc
tory
a administer or change the acl of the directory
----------------------------------------------------------------
No rights imply any others; for example, a user with "write" permission is not automatically given "insert" permission as well.
While this sounds complicated, there are four standard combinations of access which are applied to course lockers. Table 4 lists these standard combinations.
TABLE 4.
---------------------------------------------------------------
Combination Shorthand Meaning
---------------------------------------------------------------
rl read Read-only access. Users with rl
access can read files and traverse
directories, but cannot modify any
thing.
rlidwk write Write access. Users with rldwk access
can create new files and delete and
modify files, but cannot modify the
access control list.
rlidwka all All access. Users with rlidwka access
can do everything above plus changes
the acls.
none No access.
---------------------------------------------------------------
athena% fs la [directory1 directory2 ...]where [directory1 directory2 ... ] is a space separated list of zero or more directory names to be examined. (To see the current directory, the directory list can be left out, making the command simply fs la.)
Example 4 Listing the ACL on a Course Locker athena% fs la /mit/25.678 Access list for /mit/25.678 is Normal rights: system:authuser rl system:25.678 all system:facdev all system:expunge ld joeuser allThe list contains pairs of users or groups, and their respective permissions on that directory. In this example, because joeuser is the owner of the locker, he has all access, as do members of the groups 25.678 and facdev. (The latter is a group consisting of all the faculty liaisons.) system:authuser corresponds to anyone on Athena, meaning that anybody with an Athena account can read and lookup files.
fs sa directory user-or-group aclwhere user-or-group is either an Athena user id or the name of a group proceeded by the string system:, e.g. system:facdev or system:25.678.
To set the acl on more than one directory, or to add more than one user-or-group and acl pair, use the following command:
fs sa -dir dir1 -acl user-or-group1 acl1 Example 5 Setting the acl on more than one directory athena% cd /mit/25.678 athena% fs sa -dir ProblemSets Handouts -acl system:anyuser read Example 6 Adding multiple acls to a directory athena% fs sa -dir WWW -acl joeuser write janeuser allYou may specify more directories and/or more user-or-group and acl pairs. To set the acl on a directory hierarchy, you can use the find and fs sa commands as in the following example.
Example 7 Using find to set the acl
athena% cd /mit/25.678/www
athena% find . -type d -exec fs sa {} -acl system:anyuser read \;
The syntax of find may be a little confusing, but you can get more help
from the find man page or from the olc consultants.The two most common reasons to change an acl in a course locker are to make web pages accessible, and to limit access to the locker and/or directory contents to a group of students in the course. In order for web browsers to be able to access web pages, the directory containing them must be readable by anyone as identified by the group system:anyuser. Also, this group needs to be able to pass through to the directory containing the web files. To put it simply, the group needs lookup access (The AFS l bit) on every directory above the directory containing web pages.
Example 8 Setting the ACL for a Web Pages Directory athena% fs sa /mit/25.678 system:anyuser l athena% fs sa /mit/25.678/www system:anyuser readTo limit access to a directory solely to students taking the course, you need to remove the group system:authuser from the acl and add a group corresponding to the students. Note that any subdirectories you later create under this directory will inherit the modified acl.
Example 9 Inheriting an ACL from the parent directory athena% cd /mit/25.678 athena% fs sa www system:anyuser read athena% fs la www Access list for www is Normal rights: system:anyuser rl system:25.678 rlidwka system:expunge ld system:facdev rlidwka joeuser rlidwka system:authuser rl athena% cd www athena% mkdir handouts athena% fs la handouts Access list for www is Normal rights: system:anyuser rl system:25.678 rlidwka system:expunge ld system:facdev rlidwka joeuser rlidwka system:authuser rl Example 10 Limiting Access to Certain Students athena% fs sa -dir /mit/25.678/students \\ -acl system:authuser none system:25.678-students readThis command can be typed as a single line by omitting the backslash character.
There is some magic which occurs to make the translation between the syntax 25.678-students and system:25.678-students. For details, see Section 4.0 Technical Information. This section also contains information on changing the acl on all directories in a locker.
For more help with file permissions, consult the online help documentation under the topic Managing Your Account (Including AFS). (To start olh, type help at the athena% prompt.)
However, it became apparent that this naming scheme did not contain enough information because sometimes a binary which ran on one version of the operating system would not run under a different version. The new naming scheme looks for binaries to be stored in a directory under
arch/$ATHENA_SYS/bin
where $ATHENA_SYS is a system-wide environment variable set to a
machine-specific value. This naming scheme is detailed in Section 4.0 Technical Information
and summarized in Table 5. If you follow this
convention, students will be able to use the add command to quickly
access a program in a locker.
Example 11 Using Add to Access a Program athena% add 25.578 athena% myprogThis works because the add command knows how to find binaries configured according to these conventions. See the add man page for more information.
TABLE 5: Binary conventions Current Values (Athena 8.3) -------------------------------------------------- Directory Name Platform and Operating System -------------------------------------------------- arch/sun4x_56/bin Sun, Solaris 2.6 arch/sgi_65/bin SGI, Irix 6.5 -------------------------------------------------- Previous Values ------------------------------------------------------- Directory Name Platform and Operating System ------------------------------------------------------- arch/sun4x_55/bin Sun, Solaris 2.5 arch/sun4m_54/bin Sun, Solaris 2.4 arch/sgi_63/bin SGI O2, Irix 6.3 arch/sgi_62/bin SGI Indy, Irix 6.2 arch/sgi_53/bin SGI Indy, Irix 5.3 arch/pmax_u14/bin Digital DECstation, Ultrix 4.3 arch/rs_aix32/bin IBM RISC/6000, AIX 3.2 -------------------------------------------------------System types for the SIPB-supported platforms Linux-Athena and NetBSD-Athena are currently
i386_linux2 and i386_nbsd1, respectively.
The Linux-Athena 5.2 release (still in beta at this writing) uses
i386_linux3.
The first case is simple; just put the executables into the directories as described above and tell users to use add as in Example 11.
In the second case, the program installed in the binary directory will actually be some sort of startup script which sets the environment and then invokes the real binary. Example 12 shows a simple startup script that sets an environment variable, attaches an extra locker, and then invokes a binary. For this example, the real binary has been renamed to start with a capital letter so that the script and the binary can co-exist in the same directory. Note also that we use athdir to find the correct binary directory.
Example 12 Using a Startup Script #!/bin/csh -f setenv TEMP /var/tmp attach infoagents set bindir=`athdir /mit/25.578` exec $bindir/Myprog $*If you have questions about writing startup scripts, please contact one of the Faculty Liaisons for assistance.
Whenever an operating system is upgraded, you should make sure that all your binaries run correctly. At the very least, this requires that you create a new link in your arch subdirectory for the new operating system version (see 3.3 Managing Executables) and run each program on a workstation running the new release. At the most, it will require recompiling software for which you have sources or possibly getting a new version from the vendor. ACS will be glad to help you in this process. We also have test workstations which you may use to set up and check your binaries; contact f_l@mit.edu for more information.
During the summer of 1999 we will upgrade the operating system on SGIs to Irix 6.5; Sun workstations will continue to run Solaris 2.6. The corresponding system values are:
sun4x_56 Solaris 2.6 sgi_65 Irix 6.5There are two different ways to set up new binary directories in a course locker.
Example 14 Creating a Symlink to the Old Binary Directory athena% attach 25.578 athena% cd /mit/25.578/arch athena% ln -s sun4x_55 sun4x_56
Example 15.1 Creating a New Binary Directory athena% attach 25.578 athena% cd /mit/25.578/arch athena% mkdir sgi_65Note that if an old binary still runs under the new operating system, you can just create a link to it in the new directory.
Example 15.2 Sharing Some Binaries between Operating System Versions athena% cd sgi_65 athena% ln -s ../sgi_63/prog1
AFS is organized by units called cells. Within each cell, quota is allocated in terms of volumes. Most of the entities we call lockers consist of a single volume, though it is possible to have multi-volume lockers. Volumes are mounted in the AFS file system hierarchy which begins at /afs. Mount points appear to be directories in the afs hierarchy. Everything in the Athena cell is located under /afs/athena.mit.edu (/afs/athena for short), and all course volumes are under /afs/athena/course. Thus, you do not have to attach a locker to gain access to its contents, though we strongly recommend this for many reasons.
AFS supports different types of volumes: read-write volumes, read-only volumes, and backup volumes. The directory OldFiles in your home directory or course locker is simply a mount point to the backup volume for the volume comprising the locker. (At least, the volume if the locker consists of a single volume.) AFS manages quotas on a per-volume basis rather than a per-user basis, so anyone with write access to a volume can use up its quota allocation.
Example 16 Using @sys for binary directories athena% cd /mit/locker athena% ln -s arch/@sys/bin binThis will only work if you configure the locker according to the conventions outlined in this document in Section 3.3 , and should only be used for convenience. The add command will not find a directory named simply bin! You must follow the conventions outlined in Section 4.2
Note: the string "@sys" should never be used literally, except in making symlinks as above. See Section 4.2.3 on the athdir command for references in scripts, makefiles, etc.
athena% machtype -S sun4m_53When writing your own shell scripts, makefiles, etc., it is recommended that you use athdir to locate machine-dependent files (as described in the next section) rather than $ATHENA_SYS; athdir is more reliable in case of new operating system releases and changed locker conventions.
The environment variable $ATHENA_SYS_COMPAT was introduced to help lockers which have not yet been updated for a new operating system continue to function until the maintainers have updated their arch directory structure. The system-wide dotfiles set $ATHENA_SYS_COMPAT to a fallback list of @sys values which are known to be generally compatible with the current system; if the correct @sys value isn't supported by a locker, commands such as add and athdir will attempt to use a value from this fallback list instead. In this case, the user may see a message like this:
athena% add badlocker add: warning: using compatibility for /mit/badlockerNote: compatibility is intended as a mechanism to keep lockers working temporarily; it is not to be relied on as a substitute for updating binary directories when operating systems are upgraded. See Section 3.3.5 Dealing with Operating Systems Upgrades for recommended procedures.
athdir can be used in Makefiles and startup scripts as shown in Example 18. athdir takes many options and is completely described on the athdir man page.
Example 17 The athdir command athena% attach frame; athdir /mit/frame /mit/frame/arch/sun4m_53/bin athena% attach sipb; athdir /mit/sipb /mit/sipb/sun4bin Example 18 athdir in a Makefile LOCKER = "/mit/25.578" BINDIR = `athdir $LOCKER` INCLUDES = `athdir $LOCKER include` LIBS = `athdir $LOCKER lib`
/mit/locker/arch/share/binFor each shared script you must create a soft link from the machine-specific binary directory to the shared installation location. Example 19 shows you how to do this.
Example 19 Sharing a startup script athena% attach 25.678 athena% cd /mit/25.678 athena% mkdir -p arch/share/bin athena% cd arch/share/bin athena% emacs myscript & create the script here athena% chmod +x myscript athena% cd../../sun4m_53/bin athena% ln -s /mit/25.678/arch/share/bin/myscript
Course lockers are re-used from semester to semester. Locker owners/maintainers are advised that any files they leave behind in a course locker at the end of the semester may be deleted or re-used by course staff who later inherit the locker. At the end of the semester you are responsible for saving any files that you wish to keep, and for deleting anything which you do not wish to share with subsequent course staff.
When an existing course locker is reused in later terms, we try to notify the people already on the ACLs as a courtesy, but it is up to new course staff to follow up with previous course staff regarding the disposition of any existing files. We are happy to assist you with archiving existing files in an inherited locker, and clearing out or archiving your own files at the end of the term.
This means that the add command can't locate files according to the current @sys value for your platform, and is attempting to use a fallback value supplied by $ATHENA_SYS_COMPAT. Most likely, there has been an operating system upgrade, and the locker needs to have its arch directory structure updated; see 3.3.5 Dealing with Operating Systems Upgrades for help.
If the add command is returning an error such as "Command not found", your locker is probably not configured correctly. Under Athena 8.3, all SGI binaries should be put into a directory named according to the convention /mit/locker/arch/sgi_65/bin.
If you are setting up a new locker, the best thing is to follow the new conventions for naming binary directories. Table 5 lists the directories and corresponding platforms.
New course lockers are created with a directory named www at the top level; you should place your web pages in this directory. If such a directory does not already exist, you will need to create it and then set the access control list on the top level of the locker and www directory as shown in Example 8.
The URL will follow the naming scheme
http://web.mit.edu/locker/www/
(assuming you name your top
level page index.html, and place it in the www directory of your
locker).
Yes, there is. For more information, see http://web.mit.edu/cwis/tute/mitmostly2.html.
CWIS (Campus Wide Information Systems) provides training, assistance, and a wealth of information including a list of CWIS Frequently Asked Questions about web publishing at MIT.
First make sure that you have removed any files and directories which are no longer needed. Athena does not have unlimited resources! Once you have done this, send an email request to f_l@mit.edu stating what locker needs the quota increase, how much more you need, and why you need it. We will listen to each request, but because of resource limitations we cannot grant every one.
If you are fortunate, the TA's directory is still online. You can find out if this is the case by typing the command
athena% hesinfo username filsysIf this command does not return an error, the directory is still online. In this case, send email to f_l@mit.edu, telling us what files you need to access.
If the TA's directory has been deleted, we will need to restore from tape. To do this, send email to f_l@mit.edu giving us the TA's username and files you need to recover.
Are you using the recommended configuration for binary directories? There was probably a new Athena release and an operating system upgrade. You may be able to fix the problem simply by creating a symbolic link, but contact the Faculty Liaisons for more information. You may also want to read Section 4.2 The New Binary Directory Convention and Section 3.3.5 Dealing with Operating Systems Upgrades.
The UNIX find command is useful for finding recently modified files. Go to the top level of your locker and type the command
find . -mtype -<n> -printwhere <n> is the number of days since the files changed.
You can also get a good idea of what changed recently by using the ls -ltr command as shown in Example 20.
Example 20 Using ls -ltr athena% cd /mit/25.678 athena% ls -ltr | tail -20ls -ltr lists the files and directories in reverse order according to modification date. By piping this command into tail, ls will list only the last 20 modified files or directories
Last modified: Mon Jun 28 09:29:11 1999