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.

Internal Server Error with php file with 777

Discussion in 'General Discussion' started by r0drig0, Oct 26, 2011.

  1. r0drig0

    r0drig0 Member

    Joined:
    Nov 14, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Montréal, Canada
    Hello,

    I have a client requesting to run a php file with 777 permission but when it run he get this error:

    -------------------------
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@domains.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    -------------------------


    I have done the test with a simple php page with permission 777 and get the same error.
    Any idea why i can't run php file with 777?

    Thank you in advance.
     
  2. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hi,

    Do you use SuPHP? If so, SuPHP won't allow 777 php files by default..

    Thank you,
    Nibin.
     
  3. r0drig0

    r0drig0 Member

    Joined:
    Nov 14, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Montréal, Canada
    Yes i use SuPHP
    What i need to do to allow that?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You will need to ensure that files and directories are set to the correct permissions. The following thread includes some commands you can use to ensure that all files/directories use permissions that meet the requirements for suPHP:

    Switching to suPHP

    Thank you.
     
  5. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hello,

    Its a security feature to avoid malicious code exploit. If you would like to twaek suPHP security / features, you need to edit /opt/suphp/etc/suphp.conf.

    Thank you,
    Nibin.
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I would not suggest editing /opt/suphp/etc/suphp.conf at all for most users unless they have an explicit reason to edit it. We've seen people editing values in that file without understanding the consequences, breaking PHP even functioning (without telling us that the file was edited).

    Basically, I'm requesting not to simply mention editing that file unless you would provide an actual section to edit and the consequences of editing that specific section. Otherwise, simply mentioning that the folders need to be not higher than 755 and files not higher than 644 permissions as the preferred method to fix the issue under suPHP.
     
Loading...

Share This Page