CTS 1106 (Intro to Unix/Linux) Project #5
Setup a Personal Web Site

 

Due: by the start of class on the date shown on the syllabus

I.  Create a Web Page:

Using vi/vim create a web page for yourself called “index.htm”.  YborStudent has been configured to allow all students to setup their own web page that can be viewed from anywhere with a web browser.

To create a web page you must first create a directory to hold the file index.htm, which will be found automatically by the Apache web server.  The directory must be named public_html in your home directory.  The file must be a special HTML document, as shown below in the sample web page.  (You may copy this page if you change the name Hymie Piffl to your name).  Feel free to use vi to create a more complex web site if you know how.  Do not copy one from elsewhere or use a tool such as FrontPage to create one for you.  Do not make a graphic-intense web site!  Remember you have a disk quota of only a few megabytes.

Be sure your web page contains your name.  Also, if you add extra content you must make sure your web page doesn't violate the HCC Acceptable Use Policy:  No commercial web sites, no inflammatory, pornographic, or otherwise unacceptable content may be posted on an HCC web server by any student.  Ask your instructor if you are uncertain that some content will be appropriate.

The web page must be a legal HTML page, with no HTML errors for full credit.

Follow these steps exactly:

  1. Make sure your current working directory is your home directory:  cd
  2. Create the directory to hold the web site (unless you already did previously; use ls to check):  mkdir public_html
  3. Create the web page with vi, using the correct file name:  vi public_html/index.htm
    (A sample web page is shown below.)

II.  Set Permissions on the file and directories:

The default permissions won't allow any one to view your web page.  You will need to add some extra permissions.

Add the minimum extra permissions to your home directory, to the public_html directory, and to your index.htm file, so that your website is viewable using the appropriate URL.  Use what you have learned to decide on the correct permissions to use.  (Make sure you don't take away the permissions needed by your instructor to examine your files!  Remember your instructor is the only member of your primary group.)

Once these steps are completed you should be able to view your web page from anywhere using a URL similar to:  http://YborStudent.hccfl.edu/~ua00/.  (Use your login instead of “ua00”, of course.)  If this doesn't work it is likely you didn't name the file or directory correctly, or have incorrect permissions.  Check the steps above for any typos and re-do the commands if necessary.

Adding unnecessary permissions or removing any of the default permissions will lose you credit.  If you are unsure which permissions are required, please ask!

(Hint:  The web server runs as user “apache”, which means the owner and group permissions on your files and directories don't effect the result.  Once the web server finds your file, it only needs to read it in order to copy it to your web browser.  Please don't forget how files are found, by searching each directory starting at the top, until the file's inode is found.)

III.  Answer the following questions about directory permissions:

Setting permissions correctly is not intuitive!  To help you understand permissions, review your notes and the assigned readings on permissions and then answer the questions below.  It is often easier to experiment than to figure this out.  You can create a directory with a file in it and remove all permissions from both.  Then try the commands below, adding one permission at a time to see what is needed.

For each of the following commands to succeed, what permissions are required by some user on each of the directories and file shown?  (Consider each command separately.)  The answer to each of the 20 questions will be some combination of “r”, “w”, and “x”, or “none”.  For example, for question 1.a you might answer “rw” (but I hope you won't).  Note it doesn't matter if the current user is the owner, a group member, or someone else, of the file or directory; no matter who it is, they will (or won't) need some combination of permissions to perform the indicated action.

  1. For the command /bin/ls /home/user/file
    1. what permissions(s) are required for /:
    2. what permissions(s) are required for /home:
    3. what permissions(s) are required for /home/user:
    4. what permissions(s) are required for /home/user/file:
  2. For the command /bin/cat /home/user/file
    1. what permissions(s) are required for /:
    2. what permissions(s) are required for /home:
    3. what permissions(s) are required for /home/user:
    4. what permissions(s) are required for /home/user/file:
  3. For the command /bin/ls -l /home/user/
    1. what permissions(s) are required for /:
    2. what permissions(s) are required for /home:
    3. what permissions(s) are required for /home/user:
    4. what permissions(s) are required for /home/user/file:
  4. For the command cd /home/user
    1. what permissions(s) are required for /:
    2. what permissions(s) are required for /home:
    3. what permissions(s) are required for /home/user:
    4. what permissions(s) are required for /home/user/file:
  5. For the command /bin/rm /home/user/file
    1. what permissions(s) are required for /:
    2. what permissions(s) are required for /home:
    3. what permissions(s) are required for /home/user:
    4. what permissions(s) are required for /home/user/file:

 


Sample Web Page        

Sample web page
<HTML><HEAD>
<TITLE> Web page for Hymie Piffl </TITLE>
</HEAD>
<BODY>
<H1> Web page for Hymie Piffl </H1>
<P> This is my web page. </P>
</BODY></HTML>

To be turned in:

Email the URL of your web site, and the answers to the above questions, to .  If possible use the “text” and not the “HTML” mode of your email program.  Please use the subject similar to “Intro to Unix/Linux Project #5 (Web Site) Submission”, so I can tell which emails are submitted projects.

Projects will not be returned.  Please do not send as attachments.  Do not send to wpollock@YborStudent.hccfl.edu.  Refer to the Projects and the Submitting Assignments sections of your syllabus for more information.

Confused?  Send questions about the assignment to .  Please use a subject similar to “Intro to Unix/Linux Project #5 (Web Site) Question” so I can tell which emails are questions about the assignment (and not submissions).