IC221: Systems Programming (SP18)

Home Policy Calendar Units Assignments Resources

HW 2: File Permissions


  • You must turn in a sheet of paper that is neatly typed or written answering the questions below. (You are strongly encouraged to type your homework in Latex.)

    You can use the following tex file to get started with preparing your homework.

  • This homework is graded out of 100 points. Point values are associated to each question.


  1. (10 points) Consider the ls -l output below, label the output appropriately:

    drwxr-xr-x 2 aviv scs 4096 2013-12-22 10:57 demo/
    -rw-r--r-- 1 aviv scs 13454 2013-12-22 10:56 text.dat
  2. (10 points) Describe the permission strings below in plain English? What permission does the owner have, group have, and other have?
    1. rwxrw-rw-
    2. r-x--x--x
    3. rw-rw-r--
  3. (20 points) Using the man page (or trying it yourself in the terminal) describe the resulting action of the following chmod commands.

    1. chmod a+x file
    2. chmod u+x file
    3. chmod a-w file

    d chmod g+rw file

  4. (10 points) On a lab computer, type groups into the shell. What groups are you in?
  5. (10 points) In what configuration is the following information found?
    1. The list of all users on the systems?
    2. The default group of a user?
    3. The list of all groups and members (perhaps not the default group?)
  6. (20 points) On a lab computer, run ~aviv/bin/ic221-up and change into the hw/02 directory. There is a program called runme. Change the permission of this program such that is executable and run it.
    1. What command did you use to run it?
    2. What is the output of running the command?
  7. (20 points) Use ls to list the directory ~aviv/ic221-hw/hw02/ where you'll find a secret file called secret that you do not have permission to execute.
    1. Explain how you could still execute this program despite not having group or global execute permissions?
    2. Do so, and what is the output?