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.

On a few of our servers we are getting random 403 Forbidden messages, since a few months. On these servers we are running 2 php applications running on Apache2.0 mpm itk. We are using the mpm itk version so that we can run our apache using the same user as our project. The projects have a lot of image files and some users are getting a 403 forbidden when they are trying to view these images. While on other machines we don't have this problem with the same images. It's also very much at random because somethimes they see the image and the next time they don't.

Whenever a 403 forbidden is thrown in the access-logs we are getting the following error message in our error.log Permission denied: <PROJECT_PATH>/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

For one of the two projects we weren't using a .htaccess file, so i added an empty one on the location it is complaining about. I also did a chmod 777 on it, to be sure everyone has permissions on it. But this didn't fix the problem.

On the web i most of the time see that the parent dir of the .htaccess file needs enough permissions but the owner is the same user as which the apache is running in, so i don't think there are any problems with it.

Any ideas?

share|improve this question
add comment

2 Answers 2

Daan,

I've been having the exact same problem using apache with mpm-itk from ports on FreeBSD. It seems that the issue was identified and fixed in apache2.2-mpm-itk 2.2.17-01 which was released on 2011-03-21.

I've applied this upgrade to my installation and so far our monitoring hasn't picked up any more spurious 403 responses. Suggest that you try the same and keep an eye on the situation.

http://lists.err.no/pipermail/mpm-itk/2011-March/000394.html

Tom

share|improve this answer
add comment

Make sure that all parent directories have +x (exec) bit set on.

share|improve this answer
    
but if that's the issue shouldn't it give the error every time then? Because now, there are only a few ppl who get the 403. I checked and every parent directory has exec for the user and the group. –  Daan Poron May 10 '11 at 12:46
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.