Forbidden – You don’t have permission to access this page error and solution

by Vivek Gite on January 9, 2007 · 13 comments

Q. Why I am getting this error message? I am using Apache web server and my directory is located at /home/myname/public_html.

A. The permissions on your Web page are not correct. Login over ssh session and use chmod command to setup correct permission. Go to directory (for example public_html or /var/www/sitename.com/dir/) and type the following command

$ chmod 755 *.*

OR

$ chmod o+x ./

If you have more subdirectories use -R option:
$ chmod -R 755 *.*

If you have access to Apache configuration file check out for these tips to get rid of Apache 403 forbidden error.

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 13 comments… read them below or add one }

1 William June 26, 2007

hi, how do you make them open to anyone for perpetuity. for example, everytime i add a folder i have to redo the permissions.
Thanks!

Reply

2 Ameen July 4, 2007

problem in the permistion

Reply

3 Chris May 24, 2008

I get this error when trying to browse a symlink, and chmoding it had no effect.

Reply

4 hotcoder November 3, 2008

Thanks for kind info.

Reply

5 jelmer June 11, 2009

try chmod -R on the destination of the symlink, its obvious that it wont work because if you chmod the symlink you just make it make accessible for more users but the destination will remain unchanged, however if you chmod the destination it should work ok. Think like making a symlink to your shadow file and trying to chmod your symlink to get permission to the shadow file, that wont work either. Syntax:

chmod -R <rights> <file>

Reply

6 jelmer June 11, 2009

dear moderator, i see that my post has been changed in the process of posting, i did ‘try chmod -R <rights> <file>’ but the rights and file tags were stripped, would you be so kind to escape char them for me?

sincerely,
Jelmer

Reply

7 Vivek Gite June 11, 2009

I’ve updated your original post.

Reply

8 Clint October 29, 2009

This worked. On WS_FTP, it’s all but WRITE on GROUP and OTHER.
Thanks!

Reply

9 donna April 12, 2010

why am I forbidden to see my website?

Reply

10 vishwa March 11, 2011

run ps -ef | grep httpd
and check which user is running apache if you see user nobody then modify your httpd.conf
file check for User nobody and Group nobody, remove nobody and enter valid user name and restart apache.

Reply

11 atul March 12, 2011

thanxx……it worked !!!!!!!!!!

Reply

12 george czukar July 4, 2011

Why am I forbidden to enter URL?

Reply

13 somo August 2, 2011

Thanks a lot,it worked…

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 10 + 14 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.



Previous post:

Next post: