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!

Moving upload_tmp_dir elsewhere

Discussion in 'General Discussion' started by nyjimbo, Oct 29, 2011.

  1. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,131
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    New York
    We have suddenly begin experiencing users uploading very large files via various php upload functions where it will fill up /tmp and then die and leave the remnant file so that /tmp is full and nothing can write to it.

    Is it possible to move upload_tmp_dir from /tmp to something more like /phptmp let's say on another partition so we can avoid this? I dont want to mess with the current size of the real /tmp but if I move upload_tmp_dir I am not sure what to do to secure it seperately from the original /tmp

    Couldnt I just create a "/phptmp" and then set it to chmod 1777 and then change upload_tmp_dir to the new path
    and will it work?. Any security issues other than the 1777 ?

    Anyone do this and have any tips or guidance. Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 nyjimbo, Oct 29, 2011
    Last edited: Oct 29, 2011
  2. gnutoolbox

    gnutoolbox Member

    Joined:
    Sep 25, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    /tmp use to be mounted as suexec,nosuid for security reasons and its a good security measure to prevent against binary execution. If your /phptmp is not on a separate partition then it is not good for security. Try to increase the /tmp partition to the size which you want and it should solve your problem.

    /http://www.gnutoolbox.com/increasing-tmp-partition-size/
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice