PHP permissions
==========
On all our Shared/Reseller hosting Services we are running php as suPHP. suPHP provides an additional layer of protection. It causes php scripts to run under the account username instead of the user 'nobody' which is the user that apache/php would normally run under on a server that is not running suPHP. This feature allows us to easily track any potential security breaches that come in via insecure php script(s) that a hosting account is running.
suPHP also does away with the requirement for using 777 permissions on directories/files that need write permissions. In fact if a directory and/or file has the permission set to (CHMOD) 777 and it is accessible via a browser, then an internal server error 500 will be generated. The highest level of permissions that a user can use on a suPHP enabled server is 755. This permission setting is sufficient enough for any directories/files that needs to be written to.
Following on from having suPHP enabled on all our servers, we are planning to implement another PHP security enhancement in the coming weeks. At present, files on a shared/reseller server which are set to 644 permissions are readable by any user in the server since users are not jailed or locked down. This results in a security risk as configuration files containing database usernames & passwords may be exposed to other users on the same shared/reseller node. So, we recommend to avoid giving more than 600 permission to php files containing critical usernames & passwords or other configuration details.
If a hosting account on a particular shared/reseller node does become compromised, that account or user could inturn be used to read files that have the permissions set to 644. So to reduce the impact or risk of such an event occurring we are planning to enforce 600 permissions for php files on all our AU shared/reseller Servers. This means that each shared/reseller server will check permissions of php files every 30 minutes and server will set permission as 600 if it is not set as 600 or 400 already.
We however understand that some php web applications out there will just not run without having some permissions set to 644, if this is the case then you may exclude a particular domain from the automatic permissions check. If you wish to exclude your website from automatic permission changes, please create a file named "nochmodme" or "nochmodme.txt" in your home folder.
Please contact our technical support, if you need any assistance/clarification regarding this. However if you do exclude a particular site from this check, you could be increasing your risk of having that site compromised. If a php web application does require 644 permissions then you should contact the web application developer / provider to see if there is an alternate solution or fix.
The aim here is to create a secure environment for all Shared/Reseller hosting customers to operate their websites and to ensure one compromised site doesn't affect others. We trialled this permissions check on two of our Shared/Reseller nodes already with great success, and will be rolling this security change out over the next week. We recommend all Shared/Reseller hosting customers confirm their permissions and confirm what site's they might need to exclude.
FAQs
===
1. Will my website stop working with new permissions ?
Answer: Most probably no. Only web application we found issue so far is "Interspire Shopping Cart". So, if you are using interspire, please create a file named "nochmodme" or "nochmodme.txt" in your home folder.