Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 16 down vote accepted

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.

share|improve this answer
    
Spot on. I had somehome managed to change permissions on the /home directory and that had messed everything else up. Huge thank you! –  user19196 Sep 2 '09 at 22:29
add comment

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....:-)

share|improve this answer
    
"It cannot do this if a directory which is root:root does not have global execute access." That is not always true. If you are running suPHP, then PHP is running as the file owner. Theoretically, you should be able to test Apache's access by switching to the file-owning user and see if you can navigate there. –  Buttle Butkus Apr 3 '13 at 1:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.