HW 2: File Permissions
Instructions
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.
Questions
(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
(10 points) Describe the permission strings below in plain English? What permission does the owner have, group have, and other have?
rwxrw-rw-
b
r-x--x--x
rw-rw-r
(20 points) Using the man page (or trying it yourself in the terminal) describe the resulting action of the following
chmod
commands.chmod a+x file
chmod u+x file
chmod a-w file
d
chmod g+rw file
- (10 points) On a lab computer, type
groups
into the shell. What groups are you in? - (10 points) In what configuration is the following information found?
- The list of all users on the systems?
- The default group of a user?
- The list of all groups and members (perhaps not the default group?)
- (20 points) On a lab computer, run
~aviv/bin/ic221-up
and change into thehw/02
directory. There is a program calledrunme
. Change the permission of this program such that is executable and run it.- What command did you use to run it?
- What is the output of running the command?
(20 points) Use
ls
to list the directory~aviv/ic221-hw/hw02/
where you'll find a secret file calledsecret
that you do not have permission to execute.- Explain how you could still execute this program despite not
having group or global execute permissions?
- Do so, and what is the output?