Categories
Apache Web Server PHP

SoftException in Application.cpp:544: Directory “/path/dir” is writeable by group

Full error message: SoftException in Application.cpp:544: Directory “/path/to/directory” is writeable by group

The error apeared in cpanel logs at a hosting company and was related to a directory I created via ftp and where I tried to run some php script. When accessing the script from the web browser i got the error “500 Internal Server Error”

The problem is that Apache 2.0 server doesn’t allow in some cases (i don’t know these cases yet) that the directories created with write access rights set to all unless it’s set by the same unix user as the user running apache process. In order to fix this we need to create the folder from the same user as apache user. To do this we need to create the folder or to change the access rights from php.

The fix is to upload a small php file with the following code:

<?php
chmod("./dir", 0755);
?>

After we set the access right on “dir” to 777 we run theĀ  php script then the error should not appear anymore.