简体   繁体   English

受git控制的php脚本的“按组可写”异常

[英]“Writeable by group” exception for php scripts which are under git control

I am working on a website which is implemented using a number of PHP scripts. 我正在开发一个使用许多PHP脚本实现的网站。 The entire website is a git repository which is running on a dedicated Apache server. 整个网站是一个在专用Apache服务器上运行的git存储库。 The server will serve a website to the world but will not contain any reseller sub-accounts/reseller accounts. 服务器将向全世界提供网站,但不包含任何经销商子帐户/经销商帐户。

After examining the error log I see the following: 检查错误日志后,我看到以下内容:

SoftException in Application.cpp:256: File "/home/test/public_html/t.php" is writeable by group

It seems that the permission g+w is preventing PHP scripts from executing and simply throws a "500 Internal Server Error" page back to the web browser. 似乎权限g+w阻止PHP脚本执行,只是将“500 Internal Server Error”页面抛回Web浏览器。 Each time I pull from the git repository the scripts automatically acquire the permission g+x . 每次我从git存储库中提取脚本时,脚本都会自动获取权限g+x

What should I do? 我该怎么办?

  1. Disable suEXEC? 禁用suEXEC? This doesn't seem to help. 这似乎没有帮助。

  2. Is there a way to disable this "Writeable by group" requirement? 有没有办法禁用此“可按组写入”要求? would that even be sufficient? 那会不够呢?

  3. Somehow configure git to NOT add g+w permission? 以某种方式将git配置为不添加g+w权限?

  4. Something else? 别的什么?

When running in CGI/FastCGI mode you should edit /etc/suphp/suphp.conf and change: 在CGI / FastCGI模式下运行时,您应该编辑/etc/suphp/suphp.conf并更改:

allow_file_group_writeable=true
allow_directory_group_writeable=true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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