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.