简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM