Objective: Create a webpage in your home directory accessible by the world wide web
The work required in this assignment is not difficult, but requires a fair amount of knowledge. Consult the world wide web for additional tools you might need. Have fun customizing your webpage.
When a browser is pointed at your home directory on hills using the web address http://hills.ccsf.edu/~login, it looks for a directory named public_html immediately beneath your home directory. You can refer to subdirectories of public_html by appending the subdirectory to the URL. For example, http://hills.ccsf.edu/~login/cs160a looks for the directory public_html/cs160a beneath your home directory.
browsers are not known users, so the permissions of the group other apply when an object is accessed.
in order to access a file foo, you need read permission for the file foo and execute permission to each directory that must be accessed in order to get to foo (Thus, to access /a/b/foo, you need read permission to foo and execute permission to /, /a, and /a/b)
When you point a browser at a directory, this is a rundown of what happens:
if the browser cannot access the directory, it complains
otherwise, if there is a file named index.html or index.htm in the directory with the correct permissions, the browser displays it.
otherwise, if the permissions are available, the browser lists the directory's contents (the hills browser currently does not allow this)
The directory asmt02 in our public directory (/pub/cs/grwoo/cs160a) on hills has the components for our website. You won't be using a script session for this part of the assignment. It may be tempting to modify the provided files to make them prettier. You are encouraged to do that. However, this is an exercise in using Linux. You will be graded on: organizing directories, links and setting the correct permissions. HTML work is not a part of this assignment, and if you modify the page itself, keep the same directory structure. Use [hard or symbolic] links to refer to your image files, as discussed below.
The importance parts of setting up your public_html folder to be accessible by the web is to pay attention to:
Some ways you can customize your page's contents include:
You can go to http://hills.ccsf.edu/~grwoo/cs160a to see what your webpage might end up looking like.
How you create your directory structure is up to you. Below is a suggested method for those of you who need some guidelines. You do not have to do the following in a script session. Your script session will simply contain a directory and file listing of your result
For this assignment, you will simply turn in a script session of your result
Create the main directory for the page and its contents on hills beneath your home directory.
Transfer a copy of the tar archive from linux to the directory you created. Decompress it using gunzip asmt02.tar and un-tar (extract) it using tar xfv asmt02.tar
Create the appropriate subdirectories. You should see files with many different extensions: .txt, .gif, .jpg, .html, .css
You may notice that there is no index.html file in the archive's contents. Its name in the archive is MyCS160AClass.html. You must rename it to index.html
The images that display the two images at the bottom of the page in your newly renamed file index.html are named IMAGEA and IMAGEB. You should choose whatever image you like from the penguins, herdofsheep, or simpsonscast and create a link to it (either hard or symbolic) named IMAGEA. Similarly, choose whatever IMAGEB image you like from tux, montyburns, ... and create a link to it named IMAGEB. The use of a link here allows you to alter the image that is displayed without modifying the contents of the page.
Update the text file 'good.txt' using a text editor like nano or vim. Say something good about unix.
Update the text file 'cs160arobot.txt' with the URL that you would like to be included in a class crawl. If you would not like to be included, type 'rawr'
Set the permissions of the objects in the area so that a browser can access the page and its components, and cannot list the directories. You must also disallow access to other students at school. You must also ensure that your directories which lead to your website have the minimum permissions required to allow access to your website.
When you are done with the above, rename your folder as public_html in your home directory. If everything is set up correctly on hills and you have followed the procedures correctly, you should be able to navigate to your own website: http://hills.ccsf.edu/~username
Create a standard script session. All it should contain is a recursive long listing of your public_html/cs160a directory. Make sure that it is a recursive long listing! Include the directory permissions using ls -ld of public_html/cs160a directory. Make sure the page you created is accessible so that I can test it. Leave it in-place until your assignment is graded.
[grwoo@hills cs160a]$ ls -lR . .: total 1616 -rwxr-xr-x 1 grwoo csdept 48 Feb 20 07:57 cs160arobot.txt -rwxr-xr-x 1 grwoo csdept 94296 Feb 20 08:02 event.png drwxr-xr-x 3 grwoo csdept 134 Feb 20 07:59 fsf lrwxrwxrwx 1 grwoo csdept 9 Feb 20 08:08 IMAGEA -> raspi.jpg lrwxrwxrwx 1 grwoo csdept 9 Feb 20 08:09 IMAGEB -> event.png -rwxr-xr-x 1 grwoo csdept 2210 Feb 20 08:08 index.html drwxr-xr-x 2 grwoo csdept 41 Feb 20 07:58 opinion -rwxr-xr-x 1 grwoo csdept 107505 Feb 20 07:52 raspi.jpg -rwxr-xr-x 1 grwoo csdept 1436077 Feb 20 07:52 raspi.jpg~ ./fsf: total 52 drwxr-xr-x 2 grwoo csdept 6 Feb 20 07:52 free-sw_files -rwxr-xr-x 1 grwoo csdept 15177 Feb 20 07:52 free-sw.html -rwxr-xr-x 1 grwoo csdept 2185 Feb 20 07:52 gnu.css -rwxr-xr-x 1 grwoo csdept 3049 Feb 20 07:52 gnu-head-tiny.jpg -rwxr-xr-x 1 grwoo csdept 18011 Feb 20 07:52 gpl.txt -rwxr-xr-x 1 grwoo csdept 6138 Feb 20 07:52 philosophical-gnu-sm.jpg ./fsf/free-sw_files: total 0 ./opinion: total 8 -rwxr-xr-x 1 grwoo csdept 144 Feb 20 07:52 good.txt -rwxr-xr-x 1 grwoo csdept 43 Feb 20 07:58 improve.txt [grwoo@hills cs160a]$ ls cs160arobot.txt fsf IMAGEB opinion raspi.jpg~ event.png IMAGEA index.html raspi.jpg [grwoo@hills cs160a]$ cat cs160arobot.txt https://hills.ccsf.edu/~grwoo/cs160a/index.html