Setting Access Rights for AFS File Space/Directory

Once you have uploaded files into a webspace (your personal www4 folder or a locker), you will need to set access rights so that anyone can lookup your files on the Internet. Also, if multiple people will be working on the same website or in the same webspace/directory, you will need to give access rights to every person. To set access rights, you must use specific software that provides a secure connection to NC State's web servers. This tutorial's main objective is to brief the reader on setting access rights on the NC State University web server using one of the following platforms: PuTTY (for Windows) and Terminal (for Mac).

NOTE: If you only need to set access rights for a www4 personal directory, you will not need this tutorial. Click the following link and follow the instructions. https://sysnews.ncsu.edu/tools-bin/www-setup

Contact the LTRC Studio if you have any questions.


(1) FIRST, you will need to download the software for your particular machine (click to a page where you can download the software):

Windows >>
Mac >>
Terminal is included in Mac OS X
(in Utilities folder, in the Applications folder)

To make things easier, download the installer onto your desktop so that you can find it quickly.

Minimize this tutorial, follow the instructions for the installer and return to this window when installation has completed.

(2) Getting setup and configured. Before we can use PuTTY, we must enter specific settings so that the program can actually access and log-in to the NC State webservers. Here there are differences in setting up each program; OPEN the software that you have just downloaded and installed, and click on the appropriate link below to get set up.

Click for directions on configuring PuTTY

Click for directions on configuring Terminal

Once you have configured your software and successfully logged in, continue with the tutorial.

(3) To set access rights for a particular folder or directory, you must first "get" into the directory/folder. To do so you will use the cd command, for change directory.

In the command window there will be a blank space beside unity%. Here is where you will type cd location of your folder/directory. The location will begin with /afs/unity/... and will be given to you. See below for a description of the different kinds of lockers and what the location will be:

Project lockers can only be between 9 and 14 characters long. For a project called teach4life

The file pathname (location) would be /afs/unity/lockers/project/teach4life/

The URL for an index.html file in this locker would be http://www.ncsu.edu/project/teach4life/index.html


Lockers set up to give users extra file space are given the same name as the owner's Unity userid. If the userid were mjross:

The file pathname (location) for this locker would be
/afs/unity/lockers/users/m/mjross/

The URL for an index.html file in this locker would be http://www2.ncsu.edu/unity/lockers/users/m/mjross/index.html

At the unity% prompt, type cd /afs/unity/lockers/project/teach4life/ (if we are trying to give rights to our project locker teach4life) and press enter.

You will then be given another unity% prompt. Now we have entered the locker/file space/directory and can begin setting access rights.

Command

Description/Function
cd
change to directory/file space/locker
fs sa . system:anyuser rl
To give everyone read and lookup access to the locker (you will need to do this so that people can view your files over the Internet)
fs sa . unityid rlidkwa

Gives unityid (replace with individual's unity id) read, lookup, insert, delete, flock, write, and admin rights. Anyone of these can be left off, yet rlidkw is standard.

r = read (reading file contents)
l = look (listing files in the directory)
i = insert (creating new files in a directory)
d = delete (removing files from directories)
k = flock (UNIX flock() file locking)
w = write (writing to/in existing files)
a = admin (administrative privileges)

fs la directory_name
To view the list of login names with access rights to a directory, use "." for current directory
pts creategroup unityid:groupname
To create a group for your directory (where you can add members to the group, to save time instead of adding rights to each individual) where unityid is your unity id and groupname is the name you select for your group (no spaces)
pts adduser -user unityid1 unityid2
-group unityid:groupname
To add unityid1 and unityid2 to your group (without the line break)
fs sa . unityid:groupname rlidw
To grant rlidw access rights to your group
Adapted from http://help.ncsu.edu/services/getsoln.pl?id=819 and
http://www.ncsu.edu/it/essentials/managing_files/locker_instruct.html

 

When you have finished, type logout or logoff at the unity% prompt.

If you have any questions, please contact the LTRC Studio

last updated 9/8/04
http://ced.ncsu.edu/ltrc/studio/workshops/accessrights/index.htm