Does cPanel protect against bad file permissions?
My developer was trying to troubleshoot an application which was throwing 500 server errors, and he had set some files and folders to 0777. The solution seemed to be to set all the folder and file permissions to 0755 and 0644 respectively.
Does cpanel now have some sort of built in protection against file and folder permissions that less restrictive than 0755 (folders) and 0644 (files) ?
-
For SuPHP, files 644 and directories 755. Configure PHP and suEXEC - Documentation - cPanel Documentation 0 -
Thanks Infopro, but I don't understand your response. Does cpanel now have some sort of built in protection against file and folder permissions that are LESS restrictive than 0755 (folders) and 0644 (files) ? 0 -
No, like Infopro said, its from SuPHP, it protects you from using unnecessary permissions which could lead to security issues. Since PHP runs as the user, there is never any reason you should need higher permissions outside off 755/644. Occasionally some PHP scripts need execute permissions, example the scripts that pipe emails into tickets for billing software like WHMCS/CE 0 -
Hello, You can also post the output from /usr/local/apache/logs/error_log if you are encountering additional 500 error messages in your browser after correcting the permissions on the files to ones supported by suPHP. We should be able to determine the cause of the error message based on the output. Thank you. 0
Please sign in to leave a comment.
Comments
4 comments