Permission denied: /home/.htaccess pcfg_openfile: unable to check htaccess file

This domain was working this morning, now I get a 403 error and the message above in my error log. I'm not using .htaccess files but I have been doing some copy on the server so may have messed things up but no changes to this domain (unless by accident!). What is this pcfg_openfile thing anyway?

Done lots of googleing but none of the solutions seemed to fit these circumstances. Server is ubuntu Hardy Heron.


you've probably changed the permissions on the directory (or one of its parents) that the web server is looking for .htaccess in, so that the web server can no longer check to see if there's a .htaccess file.

first fix the permissions on the directory (needs to be rx by the web server process, so 755 or 775, depending on whether you want the dir to be group-writable or not). Note that you have to make sure that the permissions of every parent directory back up to the filesystem root (i.e /) are rx by the web server.

and then, if you're not actually using .htaccess files and have no intention of using them in future (i.e. you intend to put all your config into httpd.conf/apache.conf) then disable htaccess files in the apache configuration.

there is a small performance penalty for checking for the existence of, reading in, and parsing of .htaccess files in the current dir and in every parent dir back up to the document root. it's very small but it adds up when there are many requests.


If it isn't obvious that .htaccess cannot be read by the server (either 0755 or .htacess and the rest of the tree is in www-data group), search for a higher directory root only onwer:group which does ****not**** have world execute access.

In order for apache to find a file, it has to search down the tree. It cannot do this if a directory which is root:root does not have global execute access.

I've tripped over this a few times....:-)