AFS Distributed File System Exercise

Instructions to create our working web directory for the class homework. Do each task below. Reference item 3 has more informaiton of the commands.

  1. ssh to your gl account and cd to your swe2020 directory.
  2. be sure you are in your swe2020 directory. use the pwd command to make sure as in $>pwd ($> here is the command prompt - do not type that and yours will be different) and you will see an afs physical path that ends in swe2020. if not, you are in the wrong directory.
  3. make a directory for your class (here under swe2020). Create the directory 'IS651' as with the following command at the command prompt.

    $>mkdir IS651

  4. issue the following command from the root of swe2020 to see the current afs permissions (but your_username will be your real username). the la stands for list acl (access control lists) and lists the afs access control list for the directory. if your permissions do not match below, then use the second command in task 5, which should match.
    $>fs la IS651
    Access list for IS651 is
    Normal rights:
      oit.useraccess rlidwka
      system:administrators rlidwka
      www.swe_web rl
      your_username rlidwka
      
  5. we need to change the permissions. so use the following command. you can just paste it exactly as it is. the sa stands for set acl and sets the afs access control list for the directory with new or additional permissions. we have reset them so web users have access to the directory from a browser, but other users on gl cannot cd to your directory except me.

    $>fs sa IS651 jianwu rl

    Note: run the following command only if your task 4 output doesn't match.

    $>fs sa IS651 system:anyuser none www.swe_web rl jianwu rl

  6. create a blank index file in your IS651 directory to prevent directory browsing as follows:

    $>cd IS651 (the cd command changes to the directory)
    $>touch index.html (the touch command creates an empty file)

    you should now see the following correct permissions (note the period in the command which means 'the current directory' which should be IS651 at this point):
    $>fs la .
    Access list for . is
    Normal rights:
      oit.useraccess rlidwka
      system:administrators rlidwka
      your_username rlidwka
      www.swe_web rl
      jianwu rl
      
  7. open a browser and go to your new IS651 directory as in http://swe.umbc.edu/~your_username/IS651. you should see a blank page.
  8. create a directory with a hard-to-guess name such as a long number etc. under IS651 as in http://swe.umbc.edu/~your_username/IS651/65723/. NOTE: from now on, create a seperate hard-to-guess subfolder within IS651 for each exercise/homework, run $>touch index.html command within the subfolder and then actually start working on the exercise/homework.
  9. Submit a single url for the commands and outputs for task 3-6. The url should refer to a text file within the final directory you created in the end on gl.