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.

suphp and permissions

Discussion in 'General Discussion' started by jerrybell, Nov 9, 2007.

  1. jerrybell

    jerrybell Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    I just configured apache to use suphp on my whm/cpanel. I'm having a hard time understanding something - I have to have permissions on my web files and directories set to 755. BUT, isn't the point of suphp that it runs the scripts as the user set in the httpd.conf file?

    Am I missing something?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    PHP scripts will be executed as the user, but not non-PHP items like static HTML, images etc.

    Note, if a script is informing you that permissions must be set to 755, note that the script may not be scripted to be aware of SuPHP (or phpSuExec) environments.
     
  3. jerrybell

    jerrybell Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    thanks for the fast response!

    It makes sense that non php files have to be 755. The scripts are not complaining, but they just bomb out unless they have at least 755.

    I had the impression that suphp would allow me to effectively prevent one customer from being able to read the files of another, but it seems like that is not the case.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    That's weird, when you first mentioned this I took the index.php of a production WordPress site, changed it to 0700 and everything kept on working just fine (haven't changed it back either).

    How exactly is the script bombing out? Server 500 error or the script itself checking its own permissions and arbitrarily determining it needs 755 permissions?
     
  5. jerrybell

    jerrybell Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    It is working as expected now. I can set the permissions to 750 on .php files and it works.

    Disappointingly, it is MUCH slower when running suphp, but I guess that's the price of security.
     
Loading...

Share This Page