Mental Health and Wellness support

You are here

Setup personal web page

In order to set up a personal web page on Sandcastle there are a few steps which need to be performed before the web pages will be visible. These will require you to log in to a shell on Sandcastle through SSH, if you have not done this before you can find a help page to step you through that process as well.

Once logged into Sandcastle the first step is to create a directory called public_html which is where all your web content will go. The command is: 'mkdir -m 701 public_html'.

Next you will need to set up proper permissions on your home directory. First make sure that you are in your home directory (you can use the command 'pwd' which should return something like /home/std/login where "login" is your Brock login). If you are not in your home directory you can run the command 'cd' to return you to the root of your home directory. Now issue the command 'chmod 701 ./' this will make your public_html directory available to the web server.

Now you can add content to your public_html directory; the web server will look for a file called index.html by default so that is where you should start.

The permissions should be set to the following:

  • 701 for sub-directories ('ls -ld' will show -rwx-----x)
  • 644 for HTML files ('ls -l' will show -rw-r--r--)
  • 700 for CGI script files ('ls -l' will show -rwx------)

If you are not sure what these permission numbers mean you can run the command 'man chmod' on Sandcastle and read up.
Note: If your directories or CGI files have the write bit set for group or other, the webserver will refuse to load them.

Once you have added the index.html file with the proper permissions you can view it at: . Through this URL you can access the files in your public_html directory according to the same directory structure which you have them saved on the server.

Important: When setting permissions always make sure that you do not have the write bit set in any of the last 6 positions show by 'ls' as that will mean that other people on the system could potentially write changes to those files or directories.