Well-Known Member
Jan 25, 2003
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:


Sep 25, 2011
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.