Increase the size of /tmp in cPanel

if you want to increase the size of tmpdsk read the following.


  1. Stop MySQL, Apache, and cPanel to prevent writing to the /tmp partition.
  2. Copy the contents of /tmp to another location, such as /tmp_backup – cp -rfp /tmp /tmp_backup).
  3. Unmount /tmp. If you’re unable to do this you can run this command : lsof |grep /tmp – you will see what processes are still writing and you can kill them : kill -9 %PID. Or do a lazy unmount : umount -l /tmp.
  4. Now you have to delete /usr/tmpDSK with this command : rm -rf /usr/tmpDSK
  5. Edit /scripts/securetmp : vi /scripts/securetmp
  6. You have to look for this part :
    my $tmpdsksize = 512000; # Must be larger than 250000
  7. Now increase the “512000″ value and save it!
  8. Run this script to recreate /tmp : /scripts/securetmp
  9. Check the size of /tmp : df -h

Done!