|
Important Note:
If you are new to this, and are just looking to get started, you may want to use the Personal Website Setup Utility instead of manually following the instructions on this page.
Permissions can be tricky, but once you get the hang of them, they're not too bad. When somebody tries to view your webpage, the webserver will only send that webpage to the person if certain conditions are met. When the webserver refuses, the most common reason is that the "permissions are insufficient." Instead of getting your webpage, the person will get an "Access Denied" or "Error 403: Permission Denied" message from the webserver. If this has happened to you, you are the owner of the webpage, and you want the webpage to be browseable, then read on. The most likely cause is the permissions are not set correctly. This document will explain what that means, and show you how to fix it. Conceptually, the webpage the browser is trying to view is located somewhere within the hard drive of the webserver. Everything up-to-AND-including the file you want the webserver to serve to the web browser must have sufficient permissions. As a privacy measure, by default most of the files you create cannot be viewed by others. In technical jargon, this is because of "insufficient permissions." Therefore, when you want something to be viewed by others--such as your webpages--you have to give that file--and the directories above it--explicit permissions sch that it can be seen and served (by the webserver). Keeping this fact in mind will save you lots of trouble with permissions in the future. While it's not always the case, I sometimes make the generalization that on the web, you want directories to have permissions of 755 and you want files (HTML, graphics, flash, Java, etc) to have permissions of 644. If everything got a permission of 755 (that is, both directories and files), that would be fine, too - it's just superfluous. For those who do not know what permissions of 755 and 644 even mean, and are curious to find out, there are many basic Unix references available online (more) that will explain these "octal" permission numbers (more) in greater detail. The good news is that you need not fully understand them in order to start using them. Follow the instructions below to see how. First, an important note: For all info below, replace "username" with your own username (e.g. "pdoshi"). This is NOT the same as your "friendly" email address (e.g. Peter.Doshi@sju.edu). To take an example, let's say we want to make http://www.sju.edu/~username/filename.html available on the web. Here is an overview of how the permissions should be set up as follows:
Note that you can only control directories /home/username/ and its subdirectories. "/" and "/home/" are listed to make it easier to understand how this all works, conceptually, since "/" is the base of the entire filesystem, and so it must also have the proper permissions. However, you need not worry about "/" and "/home/" since their permissions are maintained by the system administrator and should already be set correctly. To set up your permissions, you need to make sure the above directories and files have the permissions shown in the left column in the table above. So to get started, first login to polaris.sju.edu. (This document assumes you already know how to do this. If not, please contact the HelpDesk at helpdesk@sju.edu or 610-660-2920 for directions and help). Once logged in, run these commands:
Here is what the commands mean:
After running these commands you should be able to access http://www.sju.edu/~username/filename.html on the web through your browser. Note on CGI permissions. Here is an overview of how the permissions should be set up for a CGI:
More info on running CGIs on a personal website is available. For those curious to learn more, you may find this reference somewhat helpful: http://www.sju.edu/sju/webpub/faq/error403.html as well as the references on Unix and permissions cited above.
|
