Permission denied: .htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Do you get the following error message when you try to visit a site/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.

You may see this message when you try to visit a folder in your domain like http://xenexbd.com/hello/. Most of the time, I have found this error for subdomains like http://hello.xenexbd.com. Most probably this is very common in a cPanel server. You may get this error after your install/uninstall FrontPage Extension in the main domain. I was repeatedly facing this problem. I usually solved it by installing/uninstalling/reinstalling the FrontPage extension on that subdomain.

But FrontPage extension is a dead project. Microsoft will not release any more update of it. So, I decided to solve in alternative ways. I searched google but did not find any specific help. So, I dig it myself and solve it within 1 min ;). Allow read & execute access to that specific directory. Uninstalling/Installing FrontPage extension ceases the access.

When you get the above error, login to cPanel & find the error log. If you see the error log shows something like :

[Thu Jun 05 15:21:54 2008] [crit] [client 202.56.x.x] (13)Permission denied: /home/x/public_html/email/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://x.com/x.html

[Note: I have replaced some value with x]

then, you are attacked by same problem. Don’t panic, its a one minute solution. We just need to give read & execute access for that directory. Mind it, execute access is necessary for direcctory if you want to read contents inside this.

Solutions
Method 1: Login to shell. now run the following command
chmod 755 email

Method 2: If you don’t have shell access, open file manager from cPanel. Enter to public_html directory. Now click on the email directory. [Note: click on directory name not the directory icon]
At right-top frame, you will get a menu. Click Change Permission. Now ensure that permission is at least 755.

If you are using X3 series of cPanel theme, select the email after entering to public_html directory. Click Change Permissions from the toolbar. Make it 755 and click Change Permissions.

All done. Now browse the site. It should come without any problem.