|
The 403 error is a particularly frustrating error, but luckily in most cases, it
is either desired by the author of the webpage/resource or a mistake/problem,
which can be fixed.
Some of the common reasons that 403 errors occur:
- Some pages can only be viewed within the .sju.edu domain. Your
network connection must, therefore, originate within the .sju.edu
domain to be comsidered within the .sju.edu domain. For instance,
a dial-up connection at home through American OnLine, will not work.
- If this is a page clearly intended to be public and visible, the
permissions may be set incorrectly. Only the author can change these.
If you are the author of the document, see below.
For Authors
The HTTP 403 - Forbidden
error refers to pages that the server is finding (ie. they do exist), but the
permissions on the file are not sufficient to allow the webserver to "serve"
the page to the end user.
This problem (as noted before) may be intentional, and therefore that is why
permissions exist in the first place. Permissions
are unix speak for the various access rights different groups have on a certain
file or directory. There are three types of permissions: read, write, and
execute. Each of these three permissions can apply to the owner, group,
and world. Let's demystify permissions for a moment before figuring
out how to change them and fix them.
Permissions demystified
Permissions have long been part of unix, and are used to protect who can
see your files (called read permission), who can edit and overwrite your files,
saving their changes (called write permission), and who can see the contents
of a directory (called execute permission), as well as who can run your programs
(called execute permission).
r - read permission
w - write permission
x - execute permission
On the web, files you want to be visible need world readability,
and directories you want on the web should have world readability
and executepermission set. To do this,
- Telnet to polaris.sju.edu
- Login with your username and password
- Once logged in, and you see a prompt (probably a % or $),
type: chmod 755 directory
or chmod 644 file
What is chmod, 755 and 644?
- Chmod stands for "Change Mode" and is the standard unix command
used to change file and directory permissions.
- 755 looks like this: rwxr-xr-x. That's Owner (the first three)
having read, write and execute permission, the unix group which the file
belongs to (the second three) having read and execute permission, and everybody else
(the last three) having read and execute permission. You are the owner, and
the only one who should be able to modify this directory, so only you should
have write access.
- 644 looks like this: rwxr--r-- That's Owner (the first three)
having read, write and execute permission, the unix group which the file
belongs to (the second three) having only read permission, and everybody else
(the last three) having only read permission. You are the owner, and
the only one who should be able to modify this file, so only you should
have write access.
For example...
Let's say my page, http://www.sju.edu/~pdoshi/projects/something.html is giving me a
403 error. What I'll do is this:
- SSH to polaris.sju.edu (if you need help doing this, contact the HelpDesk at helpdesk@sju.edu or 610-660-2920).
- Login with pdoshi and my password.
- Then, once logged in, I'll type:
% cd gets me in my home directory
% cd pub_html/projects this is where something.html is
located
% chmod 644 something.html set the right permissions
- Remember, don't type that % .
That is known as the "prompt" and needn't be typed.
|