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.

/tmp Directory problem

Discussion in 'Security' started by Maki187, Mar 24, 2014.

  1. Maki187

    Maki187 Registered

    Joined:
    Mar 24, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    Sorry for my bad english.
    I was protecting my new Web Server from shell scripts (by disabling custom php.ini files, setting open_basedir to acess only to /home and /tmp, and finaly mounting new /tmp), and all that protection works fine, but now i Have some problem with Image Uploading scripts, when upload finished, they show HTTP Error (500). Weird is that /tmp folder is writable (777), but script still cant upload image. I have even check via php is /tmp writble, and it looks ok (Your temporary upload directory /tmp is writable).

    Can someone help me with this ?

    I use CentOS 6 x64 bit
     
  2. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    940
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    What PHP handler are you using? DSO, SuPHP or CGI?

    Any 500 error should have information in the Apache error log. Reference that file to see what is causing the 500. /usr/local/apache/logs/error_log
     
  3. Maki187

    Maki187 Registered

    Joined:
    Mar 24, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I use SuPHP.
    I have just look in that log, and there is no new error, only some old.
    And what is weird is that Image Uploading script just started working normal, and cgi shell script again work, and I didnt do anything. Only way I know I can stop shell script to work, is to chmod /tmp to 750, but then a lot other things is not working.

    Thanks.
     
  4. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    940
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    /tmp has to be 1777 for the server to function. The 1 is not a typo. If you have changed it, try chmod 1777 /tmp

    If the server is returining a 500 status code, something has to go into error_log. For all we know it could be modsecurity blocking an upload. You should be able to run "tail -f /usr/local/apache/logs/error_log" in a terminal while visiting the site and see the errors as you trigger them.
     
  5. Maki187

    Maki187 Registered

    Joined:
    Mar 24, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    um, ok, thank you, i will see that.
     
  6. webfreshing

    webfreshing Member

    Joined:
    Mar 30, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Interested in finding out how you went with this???
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,708
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to let us know of any specific error messages if you are facing a similar problem and we will be happy to help.

    Thank you.
     
Loading...

Share This Page