weird apache behaviour: error 500 if not owner of files

338 views Asked by At

My server runs on Centos 5 and I recently upgraded my php from 5.4.21 to 5.4.41 for some php_intl compability issues. (my problems stated then)

I usuall have all my httpdocs files in chown root:apache and chmod 755 (except the directory i need apache to write, like the symfony app/cache or others)

Recently (after update) my webpages went blank returning a silent (no message) 500 error.

Without changing the chown of root:apache I set a chmod 755 * -R and it worked again for 2 minutes or so and went back to this silent 500 error.

I then realized that the problem did not occure if i set the chown as apache:apache

This chmod 755 * -R that fixes the problem for two minutes is really strange though and i lost quite some time trying to understand if a file was switching back to an other chmod by itself or something but nop...

If you have any clue why this chmod would fix the problem for a few minutes only.

Second thing (most important) why would apache not read my file in root:apache 755 as it clearly has the read permissions ?

a few details :

I run httpd via a "sudo httpd start" in the config the User and Group for httpd is "apache" my linux user apache is in the group apache it worked ok before i updated the php version which is weird as apache confi does not seem to have changed.

0

There are 0 answers