This assignment will give you an introduction to UNIX; you will learn about common UNIX commands and how to navigate the file system. The learning curve for UNIX is quite steep for those unaccustomed to command line interaction with computers, so try not to be discouraged if this first assignment seems daunting. There are a lot of common UNIX commands, so if this deluge of information seems difficult to handle, try making a cheat-sheet on an index card and keep it with you as you work through the course.
Additionally, please do not attempt to do the entire reading before exploring the system. Most people learn by doing rather than reading, so as you are progressing through the reading for this assignment, take some time to explore the commands being discussed as you learn about them.
As always, the tutors at the SPC are there to help you, so please come in and take advantage of their knowledge if you are having trouble getting started.
Das: Ch. 1-4 (excluding 2.9 and 2.15)
Use 'script' (Section 2.8) to record your session, so you can show it to a tutor.
What would you execute to determine ...
Not many students realize this, but every instructional account has a website associated with it. The address of this website is http://inst.eecs.berkeley.edu/~<username> where <username> is your login (cs9e-1ab for example). The files that are hosted here are located at ~/public_html. Users viewing these pages view them through the Apache web server which is run as a special user. File permissions for your web site must be configured such that this special user can access your files. Under most circumstances, this means that "world" or "other" permissions are used to designate what web browsers have access to.
Create this public_html directory as a subdirectory of your home directory and create a 'readme.txt' file in there (put whatever you want into this readme file). Note that because of the way instructional support has configured Apache, 'README.TXT' will not show up, but 'readme.txt' will.
Open up your web browser and point it to your website. You should see a directory listing containing this README.TXT file. If you don't, setup file permissions properly so you do show the directory listing and you're able to download this README.TXT file.
2a) Suppose that your working directory is your top-level directory and you give the command:
$ chmod 711 ~/public_html
Can you still view the directory listing? Can you still download README.TXT?
2b) Again suppose that your working directory is your top-level directory (~/public_html has its pre-2a permissions), and you give the command:
$ chmod 600 ~/public_html/README.TXT
Can you still view the directory listing? Can you still download README.TXT?
2c) Again suppose that your working directory is your top-level directory (~/public_html and ~/public_htmlREADME.TXT have their pre-2a permissions), and you give the command:
$ chmod 700 ~/
Can you still view the directory listing? Can you still download README.TXT?
Write down your answers for both parts and bring them in for a tutor to evaluate, and be prepared to explain why those chmod statements had the effects not just enumerate what the effects were.