Writing your own web pages

Locating your files and letting others see them

Before anyone can read your page using a browser (this includes you too, generally) you must make sure that everybody is given permission to read the files in your public_html directory. To do this, type the following four commands from the command line, pressing Enter after each:

cd
chmod a+x .
cd public_html
chmod -R a+rx .
(For the curious, these commands change to your home directory, give all users execute permission on your home directory, change to your public_html directory, and recursively give all users read and execute permission on all files and subdirectories within this directory).

You'll have to repeat the commands above after you create any new HTML files.

The location of your files on the Computer Society machines will be as follows:

http://www.sucs.swan.ac.uk/~username/

where username should be replaced by the username you use to log in to the Computer Society machines. This assumes that you have a file called index.html in your public_html directory: if not, you'll have to add the filename of your index page to the end of the location above.

So if you are username spod, and you wish to access the file called bobbins.html in your public_html directory, you would use

http://www.sucs.swan.ac.uk/~spod/bobbins.html

Next Section: HTML in more detail
Back to Index


Rhys James Jones, rhys@sucs.swan.ac.uk