( Latest revision 05/09/2005 )

How To Publish A Web Page


  1. On the suns, in your home directory, create a sub-directory named
    public_html
  2. Make it world-readable:
    chmod 755 public_html
  3. Put your web page in the directory:
    mv blahblah.html public_html
  4. Make your web page world-readable:
    chmod 644 public_html/blahblah.html
  5. (If your web stuff includes many pages and files you have to make them all world-readable.)

  6. Look around in your home directory and figure out which files and directories there should be private. Use the
    ls -l
    command to see the permissions on your files and directories.

  7. If you have files or directories in your home directory that contain information that should be kept private then make sure now that the permissions on those files allow access only to you. A file that needs to be private should have permission bits that look like one of these:
    -r--------
    -rw-------
    -rwx------
    A directory that needs to be private should have permission bits that look like this:
    drwx------
    To make changes that are needed use commands such as these:
    chmod go-rxw myPrivateLetterToMyFriend.txt
    chmod go-rxw myDirectoryOfClassProjects
    chmod go-rxw myPrivateInfoDirectory
    
    The commands above prevent people in your group (students) and others from gaining access to myPrivateLetterToMyFriend.txt, myDirectoryOfClassProjects, and myPrivateInfoDirectory.

  8. You now have to make your home directory world-readable, because your home directory is on the path from the root of the file system to your public_html directory. By now you have protected your private files according to the directions in the previous step, so the risk of opening up your home directory is minimal. Execute this command:
    chmod go+rx ~
    (The tilde: ~ is important - it means "my home directory".)

  9. Open a web browser on any host connected to the Internet.

  10. A user with login name joeuser can now open the URL:
    http://spica/~joeuser/blahblah.html
    (You have to substitute your own login name for joeuser and the actual name of a file in your public_html directory for blahblah.html)

  11. If you have a file named index.html in public_html you can just use a URL like this to access it:
    http://spica/~joeuser