Error: [403] pcfg_openfile: unable to check htaccess file, ensure it is readable

Posted on Updated on

Iam getting ERROR 403 while accessing my website, I have checked error log and I found .htacess file missing or unable to read, form the below error have to know that a file missing from the given location and also noticed one thing apache will still searching file outside to the public_html directory. This indicates that the webserver unable to reach into the hosting location. Cpanel say’s that problem with frontpage extension, reinstall it to fix the issue.

In the error log /var/log/httpd/domains/domain.com.error.log

[crit] [client 1.2.3.4] (13)Permission denied: /home/username/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

In this case the error because of  miss-permission on public_html, Here we have a script to solve permission based issues this will help you to reset users permission as their own. set_permission.sh

Also their has a manual method to solve this by changing the folder permissions with a chmod 755 (a+rx, u+w). On the otherhand have to change the group (chgrp www-data …) or maybe add Apache2 to a new group (see useradd(1) or just edit /etc/group), then restart Apache2. This may work on all systems.

root@server19 [~]# sh set_permissions.sh
***********************************************
Tue Nov 20 22:19:07 IST 2012 : set_permissions.sh
DirectAdmin File Permission/Ownership script
Usage:
 set_permissions.sh all
set_permissions.sh da_files
 set_permissions.sh user_homes
 set_permissions.sh mysql
 set_permissions.sh email
 set_permissions.sh logs
 set_permissions.sh etc_configs
internal:
 set_permissions.sh maildir <user> <path/Maildir>
 set_permissions.sh set_user_home <user>

Thankyou 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s