Does cPanel protect against bad file permissions?

nivekau

Well-Known Member
Jul 22, 2011
51
4
58
Australia
cPanel Access Level
Root Administrator
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) ?
 
  • Like
Reactions: Febriansyah

nivekau

Well-Known Member
Jul 22, 2011
51
4
58
Australia
cPanel Access Level
Root Administrator
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) ?
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
New Jersey
cPanel Access Level
DataCenter Provider
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,250
463
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.