Category Archives: cPanel

cPanel being one of the most popular and widely used control panel in hosting
We share few tips which we come across while working day in and day out.

Adding a custom php.ini cPanel account

To make your account in cpanel  server have custom php.ini for all subfolder                       You need to use below code steps

1)   Login to server via SSH

2) scp /usr/local/lib/php.ini  /home/cpanelusername/public_html/

3)   vi /home/cpanelusername/public_html/.htaccess

Add below code

suPHP_ConfigPath /home/pankaj12/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>

Once done custom php.ini should be available for all accounts

 

 

 

 

FATAL: Test install failed cpanel

 

If you get below fatal error while updating cpanel

 

[20140325.101511] ***** FATAL: Test install failed:     package cpanel-php54-ingo-3.1.2-3.cp1142.noarch is already installed
[20140325.101511]   The Administrator will be notified to review this output when this script completes
[20140325.101511] ***** FATAL: Error testing if the RPMs will install: Died at /usr/local/cpanel/scripts/updatenow.static-cpanelsync line 14050.
[20140325.101511]   see http://go.cpanel.net/rpmcheckfailed for more information
[20140325.101511]   The Administrator will be notified to review this output when this script completes

SSH to server and run below scripts

#     /scripts/check_cpanel_rpms

#           /usr/local/cpanel/scripts/check_cpanel_rpms –fix

 

This should fix all  RPM issues and cpanel should update fine now

 

 

 

 

Lynx file “/etc/lynx.lss” is not available.

Are you getting below error in cpanel for cron  Lynx file “/etc/lynx.lss” is not available” in cpanel server ?  You can fix it using below mentioned setting

 

# vi /var/cpanel/exim.conf.deps   and append it and add below entries                             /etc/lynx.lss

Now Save file and quit and error should dissappear

 

 

 

 

 

Wrong mailbox quota in cPanel

If your cpanel is showing wrong mailbox quota than the actual usage 

You  need to Do the following steps to get it fixed.

Login to your server with root user and check the actual usage of email account

#cd  /home/username/mail/domain.rld /

#du -sch emailaccount

If you found the difference in actual usage and cpanel results then

#cd /home/username/mail/domain.com/emailaccount

# rm -f maildirsize

Now login to your cpanel >> email >> email account option > Reset Quota  and reset  the quota of the account.

 

 

Fine spammer account in cpanel server

Getting sick of spammers in server and IP blacklisting ?  To find the spammer account in server you need to SSH to server and run below command

awk ‘$3 ~ /^cwd/{print $3}’ /var/log/exim_mainlog | sort | uniq -c | sed “s|^ *||g” | sort -nr

This will show the the path of the user account from where max email was sent  in sorted order.

You can suspended the user and also check if any malicious file in the directory shown.

 

 

File Manager Permission in cPanel

Having issues with cpanel Filemanager where you can write on a file with 444 permissions ? The issue is with X3 theme
. You need to modify below line in file

vi  /usr/local/cpanel/base/frontend/x/files/changeperm.html

And see if you see the line:
cpanelFileman=

change it to  without space
cpanelFileman=

 

 

 

Error from Park wrapper: Sorry, you do not control the domain

Are you getting below error ??

Unable to remove add-on domain from cPanel – Error from Park wrapper: Sorry, you do not control the domain

Remove the entries for the domain from the following files.
====================
/var/cpanel/users/username                                                                                        Run Script — /scripts/updateuserdomains
/scripts/killdns  domain.db
/usr/local/apache/conf/httpd.conf
/etc/localdomains
/etc/userdomains
/etc/trueuserdomains
/etc/trueuserowners
/etc/valiases/domain.com
/etc/vdomainaliases/domain.com
/etc/vfilters/domain.com
 /var/cpanel/userdata/username – Remove the parked domain folders                                               /var/cpanel/userdate/username/main

 

 

 

Change the time zone for my webmail?

If you want to change the timezone for your webmail as per your region onn your server, please follow the below steps:

1. Log into SquirrelMail/Horde/Roundcube webmail client with the user that you would like to change the time zone for.

2. Access the following option:

In SquirrelMail:
Click on “Options” ->  “Personal Information”
In Horde:
Click on “Options” -> “Global Options” -> on”Locale and Time”

In Roundcube:

Click on “Settings” -> “User Interface”

3. Select the timezone you need.