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

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.

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.