Monthly Archives: July 2013

Password protected directory gives 500 error

Check the folder ownership on the .htpasswds folder (above public_html). Change them from user.user to user.nobody and ensure the permissions… Continue reading »

Script to terminate suspended accounts on a cPanel server

Create a file called terminatesuspended.sh vi /root/terminatesuspended.sh Add the following code for i in `find /var/cpanel/suspended/ -mtime +30 | cut… Continue reading »

Correcting ownership of all cPanel Users

If you mess up with the ownership of all the users on a cPanel server, following script will help you to… Continue reading »

Script to correct the ownership and permisions for suphp cpanel server

#!/bin/bash cat /etc/trueuserdomains |cut -d: -f2 >user for i in `cat user` do find /home/$i/public_html/ -iname “*.php” -exec chmod 644… Continue reading »

Cpanel email queue notification script.

Create a file called mailqueue.sh.  vi /root/mailqueue.sh Add the following code. #!/bin/bash EMAIL=”youraddress@mail.com” MQUEUE=`find /var/spool/exim/input -name ‘*-H’ | wc -l |… Continue reading »

Document Root outside public_html for addon/sub domains

When adding an Addon OR Sub domain, the default DocumentRoot on cPanel servers is /home/user/public_html/addon.com. What if you want to… Continue reading »

ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number

I got the following error when giving mysql privilege to my database ERROR 1372 (HY000): Password hash should be a… Continue reading »

DRAM ECC error detected

I got the following error from my messege log. [Hardware Error]: Northbridge Error (node 0): DRAM ECC error detected on… Continue reading »

update squirrelmail in cpanel server

You can use the following cpanel script to update squirrel mail /usr/local/cpanel/bin/update-squirrelmail

Enable asp extension on cpanel server

If you want to allow .asp extension files n a cpanel server, you need to check the following things. 1,… Continue reading »