homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

htaccess pcfg openfile error
why is apache checking above docroot?

Msg#: 4537735 posted 6:02 pm on Jan 20, 2013 (gmt 0)

This is really "How to crash a web server 101."

Place a .htaccess fill somewhere above docroot. Especially in the server root directory.

This returns the usual 403:


You don't have permission to access / on this server."

Which is a bit misleading. I was looking in docroot and seeing nothing wrong. Then it transpired that all sites on the server were getting the same error.

I looked in the error_log and saw:

"[Fri Jan 18 18:30:56 2013] [crit] [client] (13)Permission denied: /.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable"

Which I still interpreted wrongly as referring to docroot.

Then the penny dropped - I had inadvertently dropped an .htaccess into the server root "/" that was unreadable by apache (ie it was owned by root:root without global read).

I removed it and everything was OK.

So my questions are:

1) Why does Apache search above the docroot anyway?
2) Is there a way of stopping it searching above docroot?

Just in case this happens again!



Msg#: 4537735 posted 6:42 pm on Jan 20, 2013 (gmt 0)

BTW sites-enables/000-default contains:

<Directory />
Options FollowSymLinks
AllowOverride None

so even if it found a .htaccess file, it shouldn't obey it but given this exclusion, why does it even look for it?

Should there be an AllowOverride for the directory immediately above docroot?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved