This article describes why a "403 Forbidden" error message may occur, and how to resolve it.
When you try to access your site in a web browser, you receive a “403 Forbidden” error message.
Additionally, you may see entries in the error log similar to the following line:
[Wed May 22 08:29:35 2013] [crit] [client xxx.xxx.xxx.xxx] (13)Permission denied: /home/username/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
This problem occurs when any of the following conditions is true:
First, make sure there is an index page in the document root directory.
Next, make sure the correct file permissions are set for the .htaccess file. To do this, type the following command at the command prompt:
chmod 644 ~/public_html/.htaccess
Lastly, make sure the correct file permissions are set for the public_html directory. To do this, type the following command at the command prompt:
chmod 755 ~/public_html
For more information about file permissions, please visit http://en.wikipedia.org/wiki/Filesystem_permissions#Traditional_Unix_permissions.
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.