dsuw85815 2016-11-25 12:02
浏览 45
已采纳

为什么“500内部服务器错误”与index.php权限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?

  • 写回答

1条回答 默认 最新

  • dongshuo2752 2016-11-25 12:37
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?