The Advanced Camera for Surveys
  general > computing > faq > web >
Science
Instrument
General

Last updated
09 March 2005 15:23:21

Maintained by
Shy


Printable version

Web Page Permissions Mini-FAQ

You create the public_html directory, make up a nice, new index.html file, and go to view your site. Instead of your homepage, you see...

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

acs.pha.jhu.edu
Wed Mar 09 15:04:57 2005
Apache/2.0.49 (Unix) mod_ssl/2.0.49 OpenSSL/0.9.7d PHP/4.3.2

What went wrong?

You failed to properly set file permissions. A recent change to the default user umask means that all files you create can only be read to and written by you. This is a problem on the web because other people need to access your files.

What can I do?

You will need to properly set all file permissions for folders and directories you create inside your ~/public_html/ directory. For example, the following web page is NOT accessible:

acs# ls -l
drwx------ 2 shy sysadmin 4096 Mar 9 15:13 directory
-rw------- 1 shy sysadmin 0 Mar 9 15:13 index.html

The only person who can read index.html is you, and the only person who can read directory/ is you. What you want to do is make your files and directories readable by others, as per the following example:

acs# chmod 755 directory/
acs# chmod 644 index.html
acs# ls -l
drwxr-xr-x 2 shy sysadmin 4096 Mar 9 15:13 directory
-rw-r--r-- 1 shy sysadmin 0 Mar 9 15:13 index.html

Now your files are readable (and directories executable) by others. Point your web browser to http://acs.pha.jhu.edu/~USERNAME/ and take a look at your functional, new web page.