cPanel

Delete Files in Trash Folder on all cPanel Accounts

Items deleted using the file manager are preserved in the hidden .Trash directory and will occasionally need deleting to recover disc space. Running this command from the command line occasionally can save a lot of disc space on your server: find /home/*/.trash/* -exec rm -rf {} \; You might need to adjust the path to…

Read More

WordPress and ModSec using the OWASP Rule Set

Running WordPress and Mod Security together can be a challenge but we have been doing it successfully for a few years now so I thought I’d share our Global Disable list and User configuration settings. These rules are globally disabled in /usr/local/apache/conf/modsec2.whitelist.conf: 981261 950901 981244 981243 981248 981257 960015 958979 981245 973343 950109 981249 973336…

Read More

cPanel Email Error: "retry time not reached for any host after a long failure period"

This can be caused by a corrupt database file. Fix it by running the following SSH commands as root: cd /var/spool/exim/db rm -f retry retry.lockfile rm -f wait-remote_smtp wait-remote_smtp.lockfile service exim restart or /usr/sbin/exim_tidydb -t 1d /var/spool/exim retry > /dev/null /usr/sbin/exim_tidydb -t 1d /var/spool/exim reject > /dev/null /usr/sbin/exim_tidydb -t 1d /var/spool/exim wait-remote_smtp > /dev/null /scripts/courierup…

Read More

SSH Commands to Remember

A list of SSH commands that I use most and should remember. Feel free to add your own via the comments section. List disc usage in readable format sorted by size du -hs * | sort -h Find the path to the loaded php.ini file php -i | grep php.ini Show uptime and load averages…

Read More

Specifying IP range using slash notation (CIDR Notation)

This is useful when specifying a range of IP addresses to block for instance. Full details here: http://networkengineering.stackexchange.com/questions/3697/the-slash-after-an-ip-address-cidr-notation Quick and nasty explanation: The number after the slash specifies the subnet mask to use which in turn limits the wild card numbers in the IP address IP Address Subnet Mask IP Range 192.168.10.0/24 255.255.255.0 192.168.10.* 192.168.10.0/16…

Read More