nyjimbo

Well-Known Member
Jan 25, 2003
1,136
1
168
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.
 
Last edited:

gnutoolbox

Member
Sep 25, 2011
23
0
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/