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.

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,125
    Likes Received:
    0
    Trophy Points:
    36
    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.
     
    #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:
    1
    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/
     
Loading...

Share This Page