Creating your PROJECT directory
Please only follow these instructions if directed by student services or computing support.
- ⇒ Official Submission Guidance from Informatics Student Services.
To submit the software accompanying your dissertation you need only place the files into a certain location in your home directory. The convention is to use the name PROJECT
, so the full working directory to your software would be
/afs/inf.ed.ac.uk/user/s/sMATRIC/PROJECT/
As instructed, remembering to place usage and installation instructions into a text named README, within this directory.
Setting permissions
As your home directory is mounted within AFS space, the Unix permissions are not sufficient to control access to your files. Having created your directory and placed files within it, you must configure the AFS Access Control List (ACL) using the AFS fs
utility.
AFS ACLs operate on directories, not files, so you need only set the ACLs on the PROJECT
directory, not the files you add to it (but you will need to apply them to any subdirectories; see below). However in order for your PROJECT
directory to be readable by others you must allow users to *list the contents of your home directory*. This is not an unusual practice in UNIX, and need not access to read the _contents_ of the files, but it does require that you take extra care when setting permissions on any subdirectories, so this section will guide you through the necessary steps to ensure that your other files are protected.
1. Protect your files
Enabling 'l' (list)
permission on your home directory allows the user or group you specify to list everything in your home directory. This means that if the names of any files in your home directory reveal personal information you do not wish to be displayed, you should either rename them or place them files into a new subdirectory with more restrictive permissions.
It also means that the ACLs set on top-level directories within your home directory are now all that protects your files from unauthorised access. By default this will be fine, as no other users should have access to any other files, but it is nonetheless good practice to check that no subdirectory grants access which you do not approve.
$ find ~/ -maxdepth 1 -exec fs listacl -path '{}' \; Access list for <path> is Normal rights: system:administrators rlidwka system:authuser l <you> rlidwka Access list for [...]
Noting that 'system:administrators
' is to be expected.
2. Make your home directory listable
$ fs setacl -dir ~/ -acl system:authuser l or $ fs setacl -dir ~/ -acl inf:staff l or $ fs setacl -dir ~/ -acl <username> l
To give list access to any user (staff and students) on DICE, only to members of Informatics, or to a specific username, respectively. Check your access controls with:
$ fs listacl -path ~/ Access list for /afs/inf.ed.ac.uk/user/y/you is Normal rights: system:administrators rlidwka system:authuser l <you> rlidwka
3. Make your PROJECT directory readable
$ fs setacl -dir ~/PROJECT -acl system:authuser lr or $ fs setacl -dir ~/PROJECT -acl inf:staff lr or $ fs setacl -dir ~/PROJECT -acl <username> lr
Subdirectories within PROJECT
As you will note from the above, the fs
utility does not operate on subdirectories. For this purpose there is the fsr
, "fs
recursive" utility. If your PROJECT
directory contains multiple subdirectories then we would strongly suggest that you pack these into a .tar file for ease of distribution:
$ tar -cf ~/PROJECT/project-$USER.tar ~/PROJECT/*
then, ensuring you have a backup of all of these files, you may remove all files in PROJECT
except for the tar
file and your README
. You should include in the README
file any instructions for unpacking the tarball (e.g. into what directory it should be placed).
However if for some reason it is essential that the subdirectories remain as-is, then you may set directory ACLs on all subdirectories like this:
$ fsr setacl <-dir and -acl as above>