0

I noticed a weird error. All PHP files on my shared hosting fail with 500 error, even empty ones.

After changing their permissions from "-rw-rw-r--" to "-rw-r-----", they started working right away.

What is this happening?

P.S. Error message from logs:

SoftException in Application.cpp:254: File "......./test.php" is writeable by group

K.Dᴀᴠɪs
  • 9,945
  • 11
  • 33
  • 43
Sergey
  • 47,222
  • 25
  • 87
  • 129
  • ...and what was in the server error log? – Matt Gibson Feb 02 '18 at 20:42
  • and what's the result of `ls -l` versus the user owning the server process. – LMC Feb 02 '18 at 20:44
  • ls -l: -rw-r----- 1 username username 0 Feb 2 15:33 test2.php // file that works -rw-rw-r-- 1 username username 0 Feb 2 15:41 test.php // file that fails – Sergey Feb 02 '18 at 20:47
  • Error message from logs: SoftException in Application.cpp:254: File "......./test.php" is writeable by group – Sergey Feb 02 '18 at 20:47
  • The group permissions should be read-only, not read-write. – Barmar Feb 02 '18 at 20:52
  • It's a security thing. You use something like suexec? – cHao Feb 02 '18 at 20:53
  • 2
    It looks like an exception from [suPHP](https://www.suphp.org/Home.html) — certainly that throws `SoftExceptions` in its `Application.cpp`. Bear in mind that their web page says that the software is abandoned and not receiving even security patches, so if that really is what you're using, you may want to change your hosting! – Matt Gibson Feb 02 '18 at 20:57

0 Answers0