Personal Web Pages

Every user account in the CIS department can have a personal web site associated with it. To activate this site, one must place a public_html directory in one's home directory to house the web site. The contents of that directory will then become available via http://www.cis.ksu.edu/~username.

Permissions

One common sticking point with personal web sites in the CIS department is the issue of file permissions. The proper file permissions are essential if others are to be able to successfully view your content.

In Linux the three primary permission categories are user, group, and everyone. Each of these categories then has read, write, and execute permissions. They are traditionally viewed as strings that look like rwxrwxr-- or something similar. Here are some examples:

Importantly, Linux uses the execute permission to determine if a client can traverse a directory. Even if every file in a directory is full access for everyone, if the directory those files are in do not have the execute permission set for everyone, they will not be able to see it.

Therefore, it is very common to need to set the following permission on your home directory and public_html directory when first creating your personal site.

chmod 711 ~
chmod 755 ~/public_html
chmod 644 ~/public_html/index.html

These commands correspond to:

At this time you may wish to run the command man chmod to learn more about how to set permissions.

Static Content

Static content includes images, html, and other content that is not executed on the server side. The everyone group will need to have read permission to any file that you wish to make available via your web site. All directories that contain static files will need to have the execute permission for the everyone group.

Dynamic Content

Dynamic content is content that is executed on the server and the output of that execution is sent to the client. All dynamic content for personal websites are executed as CGI scripts. Permissions are very important on executable scripts and it is essential that no other user but the owner may have write permission to the script and the directory that contains the script. An example acceptable permission scheme is:

chmod 755 public_html
chmod 644 public_html/index.php

Traditionally, cgi scripts that are not PHP (or other inline embedded language) are stored in a cgi-bin directory inside of your public_html directory. An example acceptable permission scheme for the cgi-bin is:

chmod 755 public_html/cgi-bin
chmod 755 public_html/cgi-bin/your-script.cgi

The header of your file should not use direct paths. Instead use the /usr/bin/env program as follows::

   1 #!/usr/bin/env perl

You should check /common/weblogs/rampage/suexec_log and /common/weblogs/rampage/error_log to debug any problems you're having with your scripts. The systems team will not debug incorrectly written scripts for you.

Tomcat

We provide an install script that will setup tomcat in your home directory for you. Login to viper.cis.ksu.edu and run this command:

   1 installtomcat5

The script will display a README file that will give you instructions on the basic usage of tomcat. If you need to you can refer to this document again at ~/tomcat5-linux/README.KSU. You may also find the official Apache documentation useful:

Department Listing

Once you have created your personal website, you may link to it from anywhere. Your website will not be automatically listed on the CIS department web site. If you would like it added there, please send an email to webmaster@cis.ksu.edu with the request.