views:

93

answers:

4

I run the following command at uni to my user account

chmod -R 700 *

Then, I run

chmod -R 755 public_html

My homepage remains to be "Forbidden" when I browse to it.

The permissions of my user account

4 drwx------  5 Newbie staff 4096 2008-12-19 12:39 Desktop
4 drwx------ 10 Newbie staff 4096 2009-04-16 02:28 Documents
4 drwx------  4 Newbie staff 4096 2008-11-28 20:48 irclogs
4 -rwx------  1 Newbie staff 1686 2008-09-10 16:00 kieli
4 drwxr-xr-x  3 Newbie www  4096 2009-04-16 02:14 public_html
4 drwx------  2 Newbie staff 4096 2008-09-01 08:43 Templates
4 drwx------  4 Newbie staff 4096 2008-12-21 03:15 tmp
4 drwx------  7 Newbie staff 4096 2008-09-03 21:39 Windows
4 drwx------  4 Newbie staff 4096 2008-10-03 16:29 workspace

The permissions of files in public_html

  4 -rwxr-xr-x 1 newbie staff   3414 2009-04-15 02:23 index.html
  4 -rwxr-xr-x 1 newbie staff   2219 2008-09-16 10:46 index.html~
144 -rwxr-xr-x 1 newbie staff 140120 2009-04-14 22:16 jquery.js
  4 -rwxr-xr-x 1 newbie staff    699 2009-04-15 01:05 template.css
+1  A: 

Do you have an index file in the directory?

Wouter Lievens
What do you mean with an index file? I have not put any index files to my folder myself.
Masi
+1  A: 

Well, your second chmod doesn't seem to be working very well, since your public_html directory is mode 744, not 755.

You'll also need to make it so that your home directory can be "looked through" by the Web server; www user needs execute permission on the directory. chmod o+x . is probably your best bet.

chaos
@chaos: 1st bug fixed. Thank you pointing that out!
Masi
+1  A: 

You would also need to give excute permission to the files in public_html. In the statement you are giving permissions chmod -R 755 public_html, still the permissions given is only 744. So give the execute permissions as well.

stack programmer
I gave the execute permissions to public_html and to the files inside public_html. The same "Forbidden" screen remains.
Masi
A: 

I found another bug.

My user folder had the permissions 700. I changed it to 701.

I can now see my website. It seems that 701 is required.

Masi