Call Us: (855) GO-LICENSE
(855) 695-4236
English
Accuracy is EXTREMELY IMPORTANT to us;
That's why we're always reviewing our answers.

Support Center

The LicenseCube support knowledge base has 234+ articles. These articles will assist you in resolving almost any issue you should face!

Rate This Article

starstarstarstarstar

How do I secure my tmp partition within cPanel/WHM?

starstarstarstarstar
Art. Nr: 134  |  Rating: 4/5 from 409 votes  |  Last Updated: Fri, May 18, 2012

The process for securing your "/tmp" directory only takes a few moments, and can be accomplished within a few minutes. Please follow the step-by-step directions outlined below for further information:

  • Login to your cPanel Virtual/Dedicated server via SSH
  • Next, run the following command within Linux:

    cd /dev && dd if=/dev/zero of=tmpMnt bs=1024 count=100000 && /sbin/mke2fs /dev/tmpMnt && cd / && cp -R /tmp /tmp_backup && mount -o loop,noexec,nosuid,rw /dev/tmpMnt /tmp && chmod 1777 /tmp && cp -R /tmp_backup/* /tmp/ && rm -rf /tmp_backup

  • Upon completion, you’ll need to add the new "/tmp" by doing:

    # vi /etc/fstab

  • At the bottom of the file, please add the following row:

    /dev/tmpMnt /tmp ext2 loop,noexec,nosuid,rw 0 0

  • Please save (Esc Key + :wq) the changes to apply!

Should you have any further questions pertaining to your cPanel license, please feel free to get in contact with our web hosting support team for additional guidance.

We like to know how to secure the tmp partition for Plesk server.

Posted by TomT. - Mon, Jul 30th, 2012

You can put tmp partition on separate drive or SSD for a lot faster access to it and make the web sites to access it faster.

Posted by Karlson - Sat, Jul 21st, 2012

Normally the dedicated servers are coming already with secured tmp partition which is like 2GB.

Posted by JimmyA. - Sat, Jul 14th, 2012

With the current huge hard drives coming with dedicated servers now even 32GB tmp partition is great idea. Better have it and not use than need it and do not have it :)

Posted by NellyC. - Wed, Jul 11th, 2012

Even 8GB is not enough if you like to repair a lot of big MySQL databases. better make it like 40 50GB. Initial tmp secured partition made by cPanel hosting control panel is only 1.5 2GB. Very small and not enough for today‘s web hosting standards.

Posted by DerekD - Sat, Jun 30th, 2012

Normally you can make 8GB secured /tmp when you are provisioning the server and working on hard drive partitioning.

Posted by DoloresA - Wed, Jun 27th, 2012

You can use for cPanel hosting their scripts : /scripts/securetmp

Posted by Randy - Mon, Jun 18th, 2012

Post your Comments