This article will guide you how to resize the tmp drive from your cPanel server.
To get rid of /tmp drive keep on full, you may follow the following step,
1. Stop the following services,
service httpd stop
service mysql stop
2. Un-mount the following drive
umount /usr/tmp (if you are using VPS)
3. Remove the temporary space
rm -f /usr/tmpDSK
4. Assign the tmp drive space (in bytes).
replace 512000 [value] -- /scripts/securetmp
Assign /tmp to 1GB
eg. replace 512000 1024000 -- /scripts/securetmp
5. Execute and apply it.
6. Start the services again,
service mysql start
service httpd start
I found out this problem just after the disk replace on backup drive but have no idea why it is occurred. However, the fixes is found.
With this issue, you may find the following error,
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:143 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth/functions.php on line 129
Login failed because your username or password was entered incorrectly.
Connection to IMAP server failed.
To resolve this problem, try to check the following issue,
1. If /etc/nsswitch.conf is exists.
2. If the permission of /etc/nsswitch.conf is 644, else do,
chmod 644 /etc/nsswitch.conf
3. check if /etc/nsswitch.conf come with any content. Update your system to get the fresh content.
The sar utility which is use monitor the history system performance data on your system.
To use the sar command, simply enter sar from the system,
To check the memory statistic,
# sar -r
To check the disk statistic,
# sar -d
To check network statistic,
# sar -n
To check processor statistic,
# sar -P ALL
To check certain date statistic let say 8th of the month
# sar -f /var/log/sa/sar09
instmodsh, a shell to examine installed modules. Used to easily list all the installed module from your server/PC.
[email protected] [~]# instmodsh
Available commands are:
l - List all installed modules
m <module> - Select a module
q - Quit the program
By hitting ‘l’, it will show you the list of installed module,
Installed modules are:
To disable mod_security2 from cPanel server,
1. Create the following folder.
2. Create a file name disabled_modsec2.conf in the above path.
3. Enter the following line if you want to disable mod_security2 for whole domain.
For specific path,
4. Run the following script from root access.
Edit the following file,
Enter the information below,
SecRule SERVER_NAME "domain.com" phase:1,nolog,allow,ctl:ruleEngine=off
Replace the domain.com will do.
To change your Windows RDP (Remote Desktop Protocol) port number to other,
1. Open Registry Editor,
2. Navigate to,
HKEY_LOCAL_MACHINE -> System -> CurrentControlSet -> Control ->Terminal Server -> WinStations -> RDP-Tcp
3. Look at “Port number” and select Decimal.
4. Change to any number that you need and perform a reboot if it is not apply immediately.
To check if RAID device install to your server, simply run the following command from your terminal.
# lspci | grep -i raid
With the above, you may simply get the raid device information.
[email protected] [~]# lspci|grep -i raid
04:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05)
By default, cPanel, WHM and Webmail using custom port instead of port 80. Hence, you might not able to access to the cPanel, WHM and webmail through a firewall enabled network such as company, University or public network.
To get this issue fixed with cPanel 11.x and later, you may enable cPanel Proxy which is designed by cPanel to allow you access through normal web port 80.
To enable cPanel Proxy, make sure that you have the following setting enabled in WHM-> Tweak Settings.
– Proxy subdomains
– Proxy subdomain creation
– Proxy subdomain override
To enable proxy domain on account wide,
/scripts/proxydomains –user=<username> add
where username is the cPanel username.
To enable proxy domain on a single domain,
/scripts/proxydomains –domain=<domain.com> add
where domain.com is your domain name such as mickgenie.com
Lastly, to remove the proxy domain, change the “add” to “remove”.
To install Softaculous to your cPanel, run the following script from SSH with root access,
wget -N http://files.softaculous.com/install.sh
chmod 755 install.sh
Now, go to WHM and select Softaculous – Instant Installs from Plugins.
By default, Windows Terminal Server and Remote Desktop Protocol (RDP) listen on TCP port 3389.
To change the port to your custom port, you may refer to below:-
1. Open the registry editor.
2. Navigate to,
3. Find the “PortNumber” and change to your needed port.
To be secure, reboot your server to apply new port.