Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Does cPanel protect against bad file permissions?

Discussion in 'General Discussion' started by nivekau, Feb 17, 2017.

  1. nivekau

    nivekau Active Member

    Joined:
    Jul 22, 2011
    Messages:
    26
    Likes Received:
    2
    Trophy Points:
    53
    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) ?
     
    Febriansyah likes this.
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,766
    Likes Received:
    313
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. nivekau

    nivekau Active Member

    Joined:
    Jul 22, 2011
    Messages:
    26
    Likes Received:
    2
    Trophy Points:
    53
    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) ?
     
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    599
    Likes Received:
    92
    Trophy Points:
    153
    Location:
    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
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page