Need help?

Our experts have had an average response time of 13.52 minutes in October 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Increase cPanel /tmp filesystem size easily

by | Nov 24, 2021

We need to increase the cPanel /tmp filesystem size because, by default, it is 4GB or 5% of the /usr filesystem size.

As part of our Server Management Services, we assist our customers with several cPanel queries.

Today, let us see how our engineers increase the size.


cPanel /tmp filesystem size

Our Support Techs recommend the procedure below to be done by an expert system administrator.

In addition, since we have to temporarily stop the services that write to /tmp, we have to perform this on a scheduled time.

This procedure only works on servers on which cPanel has generated /tmp.

Suppose if it does not contain /dev/loop in its name, cPanel created the filesystem by the server’s operating system or data center.

In such a case, we need to seek assistance from the data center to increase the size of /tmp.

Moving ahead, let us see how our Support Techs perform the same.


How to increase cPanel /tmp filesystem size

1. To begin with, we can modify the following line in /scripts/securetmp to set tmpdsksize to the desired size.

For instance, here we are using 10 GB:

my $tmpdsksize = 10485760

2. Then we comment out the below section of /scripts/securetmp:

my $five_percent_of_available = ( $available * 0.05 );
if ( $five_percent_of_available > $tmpdsksize ) {
$tmpdsksize = $five_percent_of_available;

my $FOUR_GIG_k = ( 1024 * 1024 * 4 );
if ( $tmpdsksize > $FOUR_GIG_k ) {
$tmpdsksize = $FOUR_GIG_k;

3. We need to confirm which services are currently using /tmp:

lsof | grep /tmp | grep -v deleted

4. After that, we will temporarily disable monitoring for the services using /tmp.

For example:

whmapi1 configureservice service=cpsrvd enabled=1 monitored=0
whmapi1 configureservice service=mysql enabled=1 monitored=0
whmapi1 configureservice service=httpd enabled=1 monitored=0

5. Then we stop the services that use /tmp:

/scripts/restartsrv_cpsrvd --stop
/scripts/restartsrv_mysql --stop
/scripts/restartsrv_httpd --stop

6. Later, we unmount /tmp and /var/tmp:

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

7. In addition, we can move the /usr/tmpDSK file to another location to mount it elsewhere to preserve data:

mv /usr/tmpDSK /usr/tmpDSK_bak

8. Eventually, to create the larger /tmp filesystem, we run:


9. And then we restart the services we stopped previously:

/scripts/restartsrv_cpsrvd --start
/scripts/restartsrv_mysql --start
/scripts/restartsrv_httpd --start

10. Finally, we re-enable monitoring for the services.

For example, like this:

whmapi1 configureservice service=cpsrvd enabled=1 monitored=1
whmapi1 configureservice service=mysql enabled=1 monitored=1
whmapi1 configureservice service=httpd enabled=1 monitored=1

[Need further assistance? We are available 24*7]



In short, we saw how our Support Techs increase the filesystem size.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.



Submit a Comment

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



Privacy Preference Center


Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]


Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid


Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie


These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.