How to fix the Error”InnoDB: Operating system error”?

For many reason Mysql service may go down. If the mysql service is showing down, first you check the mysql log file ‘/var/log/mysqld.log’ for errors. If you get the following errors in log, you can easily fix this by correcting the access permission of mysql (/var/lib/mysql where the ibdata1 is located) directory to mysql user access permission.

101114 12:45:43 mysqld started
101114 12:45:43 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: ‘open’.
InnoDB: Cannot continue operation.
101114 12:45:43 mysqld ended

You can correct the permission by running the following command and finally restart the mysql service.

chown -R mysql:mysql /var/lib/mysql

Error while parking a domain in Cpanel/WHM

Sometime you will get error Error from park wrapper: domain.com is already configured. while creating a parked domain ‘domain.com’ in Cpanel. This is because the entry for that particular domain is present in some of the configuration file in the server. You can fix this error by removing those entry from the server.

If we see an error like this please check the following files for that particular domains entry and remove those entry if you found any.

/etc/httpd/conf/httpd.conf
/etc/named.conf
/var/cpanel/users/username
/scripts/updateuserdomains
/var/named/domain.db
/etc/userdomains
/etc/localdomains
/etc/trueuserdomains
/etc/trueuserowners
/etc/valiases/domain.com
/etc/vdomainaliases/domain.com
/etc/vfilters/domain.com

Once you done this, you should be able to create parked domain from cpanel.

It will work for you ….:)

Email Creation error in cpanel

You may get the error No such file or directory: /home/ user1/etc/user1.com/passwd passwd while creating an email account in Cpanel. This is because the ‘/etc’ folder inside the home directory was missing. You can fix this by creating an ‘etc’ folder under ‘/home/user/’ and set the folder permission as 0750, ownership as user:mail (user permission to particular username and group permission as mail). This should fix your issue.

How to remove IP from database in case of ‘cPHulk bruteforce attack’?

cPHulk is a brute force protection system developed by the cPanel team and is exclusive to cPanel / WHM control panels. This protects service like WHM, SSH,FTP,IMAP and POP3 by disabling the authentication to those service after a brute force attack is detected. cPHulk mainly blocked the IPs which have perform more than one wrong login attempt with in a tiny time limit. If we need to remove a particular IP from the cPHulk deny list this is possible in two ways, Either from WHM or through database.

Let us see how to remove IP from database.

  • First you need to SSH to the server as root.
  • # mysql (prompt should change to mysql)
  • mysql> use cphulkd; (database changed )
  • Make a database table backup. ( mysql>BACKUP TABLE `brutes` TO ‘/path/to/backup/directory’; )
  • Find the particular IP from table. (mysql> SELECT * FROM `brutes` WHERE `IP`=’xxx.xxx.xxx.xxx’; )
  • Delete a particular IP from the table. (mysql> DELETE FROM `brutes` WHERE `IP`=’xxx.xxx.xxx.xxx’; )
  • Quit from MySQL ( mysql>quit )

To flush full database

  • mysql> delete from brutes;
  • mysql> delete from logins