Meena Alfons Meena Alfons - 9 days ago 6
Apache Configuration Question

Why "500 internal server error" with index.php permission 666?

In a fresh Wordpress site (this may be valid to other sites too), Having index.php permissions set to 0666 makes


Error 500: Internal server error


But simply changing its permissions to 0644 solves the problem. Why?

Answer

Your apache configuration may have some php handler like suphp:

http://www.suphp.org/Home.html

suPHP is a tool for executing PHP scripts with the permissions of their owners. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) that is called by the Apache module to change the uid of the process executing the PHP interpreter.

Since suPHP makes your PHP scripts run with the same permissions as your regular user account, you do not need group or world write access or execute access for files and PHP will even prevent files from running that are group or world writable or executable as a security precaution.

Comments