Tags Archives: cpanel

Find symlinks on Cpanel

Find all possible root symlinks (leftover from attempted exploits) and save them as a list ‘symlinks.txt’. ls /var/cpanel/users | grep -v “\`\|\.\|cpanel\|root\|mysql\|nobody” | \ while read CPUSER; do find /home/$CPUSER -type l -not \( -lname “/home/$CPUSER/*” \ -o -lname “*rvsitebuilder*” -o -lname “[^/]*” -o -lname “/usr/local/apache/domlogs/*” \ -o -lname “/usr/local/urchin/*” \) ; done \ > […]

Installing Subversion on Cpanel/WHM

Make and install Subversion: mkdir -p /usr/local/src/ wget http://subversion.tigris.org/downloads/subversion-1.5.2.tar.bz2 tar xfj subversion-1.5.2.tar.bz2 && cd subversion-1.5.2 ./configure –with-apxs=/usr/local/apache/bin/apxs –with-apr=/usr/local/apache/bin/apr-1-config –with-apr-util=/home/cpeasyapache/src/httpd-2.2.17/srclib/apr-util make && make install Add to pre-main include in Apache Configuration (WHM): LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so Set up EasyApache’s per-user virtualhost config directories (if not present): mkdir /etc/httpd/conf/userdata mkdir /etc/httpd/conf/userdata/std mkdir /etc/httpd/conf/userdata/std/2 Add a […]

Cpanel: Error invalid maildir size file

Sometimes an email account goes over quota and the quota can’t be adjusted due to the following error: Error invalid maildir size file The following commands ran as root will resolve most email quota issues for a Cpanel account, including incorrect quota calculations. Substitute <cpaneluser> with the Cpanel user which owns the email account having […]

Cpanel: Install mod_geoip for PHP

First, install the Maxmind GeoIP database. mkdir /usr/local/share/GeoIP cd /usr/local/share/GeoIP wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz gzip -d GeoIP.dat.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gzip -d GeoLiteCity.dat.gz wget http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-mod_geoip.tar.gz tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_geoip.tar.gz Then, recompile Apache and PHP. /scripts/easyapache

Cpanel: Clear out catch-all and default email

Cpanel creates a default address inbox for each domain consisting of the Cpanel user’s primary username. This address is not used for normal email, rather as a catch-all (if enabled) or a sink-hole for delivery failures or auto-generated mail from scripts. It is fairly safe to regularly empty out these mailboxes, and it will free […]

Cpanel: Undefined subroutine &Compress::Zlib::gzopen

On a particular Cpanel box I occasionally receive the following when attempting to install or update any Perl module — whether initiated by myself or by Cpanel: Undefined subroutine &Compress::Zlib::gzopen The fix is to remove all traces of Compress:Zlib with the following command: rm -rf `find /usr/lib/perl5/ | grep Compress | grep Zlib` When this […]