cPanel ModSecurity Hatası
In the latest cPanel it seems that there is an array of changes, including how EasyApache approaches user configuration for Modsecurity. A plugin was created and is available under WHM -> Plugins. However, a recent error appeared in regards to the password being incorrect:
‘The mod_security plugin could not connect to the database. Please verify that MySQL is running. Error: Access denied for user ‘modsec’@’localhost’ (using password: YES)’
As the error states, the modsec user does not have the correct password or privileges to access the database. The easiest manner to find the current password for modsec is to simply check the cron at /etc/cron.hourly/modsecparse.pl. Simply open /etc/cron.hourly/modsecparse.pl or concatenate the file to find the following data:
my $dbhost = ‘localhost’;
my $dbuser = ‘modsec’;
my $dbpassword = ‘Password-Here’;
my $dbname = ‘modsec’;
my $tblname = ‘modsec’;
Use the password from $dbpassword and update it via MySQL command line:
mysql;
use mysql;
UPDATE user SET Password=PASSWORD(‘$dbpassword’) WHERE USER=’modsec’;
flush privileges;
exit;
Once completed, simply refresh your WHM page, and the issue should be resolved.