cpanel Could not edit password file : Permission denied


Issue: I got this error while changing the email account’s password through cpanel.

Solution:

Check permissions of passwd file in /home/username/etc/domain.com/

The correct permissions should be the following:

-rw-r–r– 1 username mail  196 Dec  3  2005 passwd
-r–r–r– 1 username mail 1088 Dec  3  2005 passwd,v

Try to change the password now.

That’s all……!!!!

Default .htaccess content for a Word Press website


If you feel the .htaccess file inside your document root of wordpress site is wrong, you can use the default contents pasted below.

 

————————-

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

———————–

 

That’s all………!!!

Load due to a particular user in the server


Whenever the load in the server increases due to a particular user in the server, we can solve it using the following steps.

Find the domain owned by the user:

grep username /etc/userdomains

use the following command after you get the domain name:

less /usr/local/apache/domlogs/domain.com | awk ‘{print $1}’ | sort | uniq -c | sort -n

Note: use the domain name in the field of  “domain.com” in the above command

This will give the ip and number of connections in the descending order.

Example:

12000  75.52.110.145

29172  66.249.68.183

458262  208.55.16.55

You can block the above Ip’s since there is too many connection from the above Ip’s.

 

You can use either csf or iptables.

csf -d >IP>

OR

iptables -A INPUT -s <ip> -j DROP

That’s all…..!!!

 

Script to generate backups of all accounts under a reseller in cPanel


You can generate backup of all the accounts under a reseller using the following script.

———————————

for i in `grep resellername /etc/trueuserowners | awk ‘{print $1}’ | cut -d’:’ -f1`;do /scripts/pkgacct $i;done;

———————————-

 

That’s all……..!!!!

Account ownership is not showing in /etc/trueuserowners


Issue : When I checked ownership of a cpanel account , it didn’t shoe anything.

——————-

root@tricks [~]# grep lilianka /etc/trueuserowners

root@tricks [~]#

——————-

Solution:

First you need to move/remove the files “/etc/trueuserowners” and “/etc/userdomains”

Then run the following script.

1.  /usr/local/cpanel/bin/userdata_update

2.  /scripts/updateuserdomains

Check it now……!!!

That’s all……!!!

 

webmail.domain.com and cpanel.doamin.com is not loading


Issue: when I call webmail.domain.com it’s not loading but at the same time domain.com/webmail is not loading

Solution:

In order to get this issue resolved, it needs to enable Proxy subdomains as below :

Go to WHM
WHM >> Main >> Server Configuration >> Tweak Settings >>Proxy subdomains

Enable the option “Proxy subdomains”

That’s all…..!!!

Starting MySQL. ERROR! The server quit without updating PID file


Issue: I got this error while restarting mysql service

solution:

You just needs to add the below line in /etc/my.cnf

[mysqld]
innodb_force_recovery = 1

Please restart mysql now.

If this doesn’t help remove the entry and add the below in my.cnf file

[mysqld]
skip-innodb

Restart it now.

That's all......!!!

Disable cPanel redirection to SSL through backend


If you are unable to login to WHM , you can disable those options from the shell.

SSH to the server as root.

Open the file “/var/cpanel/cpanel.config”.

ie;  vi /var/cpanel/cpanel.config

and set the following options to 0 (zero).

—————-

alwaysredirecttossl

requiressl

——————

ie;

alwaysredirecttossl=0

requiressl=0

Try it now

that’s all………!!!!!!

RTNETLINK answers: Operation not supported


Issue : I got this error while restarting the network service.  Also ifconfig shows nothing on the vps.

——————-

# service network restart

Shutting down loopback interface: [ OK ]
FATAL: Module ipv6 not found.
Bringing up loopback interface: RTNETLINK answers: Operation not supported
Failed to bring up lo.
[FAILED]
Bringing up interface venet0: RTNETLINK answers: Operation not supported
Failed to bring up venet0.
[FAILED]
FATAL: Module ipv6 not found.

———————-

Solution :

The issue was with iproute package. The package got updated automatically and it was not excluded in yum updates. To fix the issue, you need to downgrade the package iproute.

Login to the main node and download the RPM as per the arch.

[root@node9 ~]# wget http://repo.smartservermanagement.com/misc/iproute-2.6.32-23.el6.x86_64.rpm

Then copy it to vps.

[root@node9 ~]# cp iproute-2.6.32-23.el6.x86_64.rpm /vz/private/<vpsid>/fs/root/

After that enter to the vps

vzctl enter <vpsid>

Then run the following command.

rpm -qa |grep iproute

You will get the current iproute package versiom

ie;

root@server [~]# rpm -qa |grep iproute

iproute-2.6.32-31.el6.x86_64

Now remove the old package and install newly downloaded version.

root@server [/]# rpm -e iproute-2.6.32-31.el6.x86_64 –nodeps

Go to the location where you copy the file from node and install it.

root@server [/]# rpm -ivh iproute-2.6.32-23.el6.x86_64.rpm

 

Try to restart network now and run ifconfig after that.

That’s all……….!!!

 


	

In order to prevent conflicts, Tweak Settings may not be altered while a cPanel & WHM® update is in progress


Issue : I got this error while accessing Tweak Settings through WHM.

Solution :

Firstly check if really upcp is running, you can check with the command :

 ps axfwwwu | grep cPanel\ Update

If yes then let it be done otherwise, the issue may raised due to a new version of cpanel was downloaded, but
either upcp is still in progress or failed and is incomplete.

And the entry made at file /usr/local/cpanel/upgrade_in_progress.txt

you just needs to move/remove that file and now you can access Tweak Settings

 

That’s all………..!!!!!!!

Previous Older Entries

Blog Stats

  • 37,402 hits