Permission denied: /.htaccess pcfg_openfile: Unable to check htaccess file

You may get following error while browsing your site:

Forbidden
You don’t have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Apache generates error in error log file for the above issue as:

[Sat Jun 25 13:30:51 2011] [crit] [client xxx.xxx.xxx.xx] (13)Permission denied: /home/username/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Once I got this error for my site. The reason for this error usually is:
1. Installing or uninstalling FrontPage Extensions for the domain.
2. Changed ownership of public_html directory.

You can fix this error by:
1. Re-installing / Uninstalling FrontPage Extensions.
2. Checking the permissions and ownership of file or directory listed in the error logs (You don’t have permission to access / on this server ). In this case it is public_html folder.

On cpanel server for public_html folder ownership should be username.nobody and permission should be 750
For any other directories and files permission depends on exact type of the server but generally it is 755 for folder and 644 for files.

In my case it was an issue regarding the ownership of public_html folder which was set to username.username. It was fixed after changing ownership to username.nobody

This entry was posted in Apache and tagged , , , . Bookmark the permalink.

Leave a Reply