Filed under:

Securing and cleaning the /tmp directory/partition on Cpanel/WHM servers...




  • stop all services which uses /tmp
    service httpd stop
    service mysql stop
    service chkservd stop
  • remove the tmp directory
    umount -1 / tmp
    umount -1 /var/tmp
    rm -fv /usr/tmpDSK
  • recreate and secure /tmp
    edit /scripts/securetmp and change the $tmpdsksize to your chosen number of bytes (we use 20480000 = 2Gb)
    /scripts/securetmp answering yes to both questions
  • restart the server
    reboot


Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read

Language: