How to increase /tmp size and secure

cPanel recommend that you use a separate partition for /tmp that is mounted with nosetuid. Nosetuid will force a process to run with the privileges of it’s executor. You may also wish to mount /tmp with noexec after installing cPanel.

1. Stop the following services like cpanel, apache (litespeed), mysql:

/etc/init.d/cpanel stop
/etc/init.d/httpd stop
/etc/init.d/mysql stop

2. Umount /tmp and /var/tmp partition:

umount -l /tmp
umount -l /var/tmp

3. Move /usr/tmpDSK file to another location (In case you’ll need to mount it somewhere else to preserve data):

mv /usr/tmpDSK /usr/tmpDSK_back

4. Modify the script “/scripts/securetmp” to set desired size for tmpdsksize:

vi /scripts/securetmp
$tmpdsksize = 2048000

5. Run following script:

/scripts/securetmp

6. Start cpanel, apache (litespeed), mysql services:

/etc/init.d/cpanel start
/etc/init.d/httpd start
/etc/init.d/mysql start

Thats it ..!!!!!!

You May Also Like

About the Author: Bipul

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.