NOTE: Student Server has restricted access
The purpose of the student web server is NOT to provide students with world
accessable webpages, but to provide them a place where they can study using
web clients, languages, and web projects. As such the server is restricted to
access from within Griffith University, and some Australian ISP providers.
More specific information can also be found on the Gucis Home Page OR by
contactng the CIT webmaster.
The following can be a security hazard, before attempting the following you should know and understand the use of the UNIX commands `chmod' and `umask' particularly with regard to `other users'. If you are unsure or require help PLEASE contact one of the system programmers to get you a helping hand. (Via the help desk, Room 1.34 Technology Building)
Again if you are unsure please contact one of the system programmers to help you. We are here for you!
The following command will ensure that only you can access any file in your own home directory (including the dot files).
chmod -R go= ~
umask 77This prevents any new files you create in the future from being readable to anyone who has access to your home directory. Until you use the 'chmod' command to say otherwise (such as a new webpage).
chmod o+x ~The above allows anyone not in your usergroup to 'access' your home directory but not 'read' or 'list' the contents of your home directory.
mkdir ~/public_html
chmod 755 ~/public_html
The main file in your WWW home pages is called "index.html" (in the "public_html" sub-directory). This file must be in a special formated language simular to the TeX processing language known as the HyperText Markup Language, or more generally called 'HTML'. For more information on creating your first web document, see the document 'Writing HTML'.
Just use your favoriate text editor to edit the file. Many higher level editors allow you to create and edit HTML files without the need to actually know the Hypertext Markup Language.
chmod 644 ~/public_html/*.htmlThe following will make EVERYTHING in your "public_html" directory accessable to the web server and thus to the world.
find ~/public_html -type f -print0 | xargs -0 chmod 644 find ~/public_html -type d -print0 | xargs -0 chmod 755Once this is done, the School's WWW Information server will automatically know about your new home page and will display it in the 'User Supplied Home Pages' generated listings on that server. NOTE: You may however have to use the ''reload'' command of your WWW browser program to re-update this list when checking for your new home.
If your call your top level index html file "index.htm" instead then you will have a top level index page BUT your home page will also NOT be listed in the 'User Supplied Home Pages' list.
NOTE: A "index.shtml" file (index file with 'Server Side Includes') will be listed in 'User Supplied Home Pages' list. For more information on 'Server Side Includes' I refer you to the Apache Server Documentation
A couple of programs used in the School Information Server looks for files of these names. In particualar the ''User Supplied Home Pages'' know about the following html documents. These are...
This file must contain only a couple of lines of information about your home page. Do not place anything too fancy or large in this line, just a short description about what your homepage is supposed to provide to the network.
As this file is `included' into a larger HTML document, it should NOT contain any header tags (like <HTML>, <TITLE>, <BODY> etc), or footers, just a couple of lines of HTML text.
Small images are ok, as is font color and size changes. As long as it is ''in moderation'' and ALL your tags are properly closed. All images (small ones ok) should also include WIDTH and HEIGHT tags.
You are now ready to try out your page. To test, simply start a netscape (or other) WWW client and go to the right User Supplied Home Pages for that machine (see above). If you did everything properly you name should appear on the list of home page available. Use the ''reload'' command of your WWW client to reread this list if needed.
I have a small private (only I can run) shell script to set ALL the permissions within my home directory. I then run this when ever I have made lots of changes or want to ensure all permissions are correct.
Given the above the following shell script is a bare bones script to re-set your home directory permissions correct. Please modify to suit your needs.
#!/bin/sh # # Reset your home directory permissions correctly # You should expand this script and run it regularly to # 'lock down' your home directory permissions. # cd chmod -R go= $HOME find public_html -type d -print0 | xargs -0 chmod 755 find public_html -type f -print0 | xargs -0 chmod 644 chmod 711 .Or for a more complex shell script allowing greater flexablility and and modification to set permissions of ALL your home directories.
#!/bin/sh # # Reset your home directory permissions correctly # cd # go home x="-n5" # options to xargs l="-AF1" # options to ls c="-f" # options to chmod (not on sgi's) chmod 711 . # home directory settings # Close all the upper level directories and files to anyone else ls $l | sed '/[^\/]$/d; s/\/$//' | xargs $x chmod $c 700 # upper directories ls $l | sed '/[\/]$/d; s/\*$//' | xargs $x chmod $c 600 # upper files chmod $c 644 .plan .project .forward 2>/dev/null # open certain dot files chmod $c 755 public_html # open the public directories # some subroutines directories() { find "$@" -type d -print0; } # set directories allfiles() { find "$@" -type f -print0; } # all plain files executables() { find "$@" -type f -perm -100 -print0; } # executables only datafiles() { find "$@" -type f ! -perm -100 -print0; } # non executables # Open and set WWW directory if [ -d public_html ]; then directories public_html | xargs -0 $x chmod $c 755 # directories - accessable datafiles public_html | xargs -0 $x chmod $c 644 # data - readable executables public_html | xargs -0 $x chmod $c 755 # executables - executable fiFor more information please contact one of the system programmers.