Thursday, 9 November 2017

Default email account showing incorrect disk usage in cpanel



I came across an issue in which the disk space usage on some email accounts, especially the default email account is not updated in cpanel. I have checked the user mailbox of the default email account via Webmail and noticed nothing there. I have done the followings steps to sort out this issue.

1. Log in to the server via SSH

2. Execute the following script :

/scripts/generate_maildirsize --confirm --allaccounts --verbose cpanelusername

If it doesn't solve the issue then use the following steps

1. Log in to the server via SSH

2. Locate the files email_accounts.yaml and email_accounts.cache under .cpanel directory of the user and rename it to a different name.

Friday, 13 January 2017

Wordpress site restoration using backupbuddy plugin


Backupbuddy is a wordpress plugin used for backup and restoring wordpress sites. To do a WP site restoration process via backupbuddy plugin we needs the following details

1. backup file generated by the plugin in zip format
2. importbuddy.php file
3. Password provided at the time of the backup generation.


Upload the importbuddy.php file and backup file to the document root of your account on path /home/user/public_html/. Then take the importbuddy.php file on your web browser as follows

http://www.domain.com/importbuddy.php


ImportBuddy will now ask for the password that you created when you downloaded ImportBuddy.  On entering the password it will display the bacckup file you uploaded. ImportBuddy will unzip your backup file and show you a success message when it has extracted the files. On the next screen it will ask for the site URL and database details. You can enter the new DB details (DB username, DB name & password) here. After the restoration process click on the “Clean up and remove temporary files” button.

Thursday, 14 July 2016

Awstats not working in Cpanel


If you are getting “There are no domains which have awstats stats to display” while checking the Awstats from your cPanel >> logs >> Awstats. You can refer the following steps to resolve this issue

Please check the following files :

/usr/local/cpanel/3rdparty/bin/awstats.pl
/usr/local/cpanel/base/awstats.pl

The first file, /usr/local/cpanel/3rdparty/bin/awstats.pl, should be 755 file permissions. The second file, /usr/local/cpanel/base/awstats.pl, should be a symlink to /usr/local/cpanel/3rdparty/bin/awstats.pl

If the permissions are correct we have to run the following script to solve this issue

/scripts/runweblogs cPanel_username

 

 

 

 

 

 

Monday, 14 March 2016

Tmpwatch installation to clean cache files

yum -y install tmpwatch
crontab -e
0 */1 * * * /usr/sbin/tmpwatch -am 1 /tmp/nginx_client



Blocking xmlrpc attack via .htaccess

You can add the below code to your .htaccess file to block POST requests to xmlrpc.php file due to excessive brute force attacks :

ErrorDocument 403 default
<Files xmlrpc.php>
    <Limit POST>
        Order deny,allow
        Deny from all
    </Limit>
</files>

Shutdown command

 /sbin/shutdown -h now

Email address verifying

You can verify the email accounts if they are valid from the following links :

http://hellodns.net/index.php/home/emailVerifier
http://verify-email.org/