Error on ModSecurity Tools
I have following error on "ModSecurity" Tools":
Error: The following exception has occurred: API failure: The system could not read the modsec database password file "/var/cpanel/modsec_db_pass":
NOTE: I using remote mysql server.
-
Hello :) Please let us know if the following command addresses this issue: /usr/local/cpanel/scripts/setup_modsec_db
Thank you.0 -
info [setup_modsec_db] Initialized ModSecurity" database. 0 -
That's the output from the command. However, could you verify if the error message you reported is still visible? Thank you. 0 -
Yes, its still exists. 0 -
Could you verify if the "/var/cpanel/modsec_db_pass" file exists on this system? If not, please create this file: touch /var/cpanel/modsec_db_pass chmod 0600 /var/cpanel/modsec_db_pass
Then, populate this file with a single line containing a randomly generated password. Here's an example (note you should use your own randomly generated password):# cat /var/cpanel/modsec_db_pass RandomPassword
Then, update the password for the database to the one in that file:mysql mysql
mysql> update user set Password=password('RandomPassword') where User='modsec'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> quit; Bye
Thank you.0 -
Thank you very much, problem resolved :) 0 -
I am happy to see the issue is now resolved. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
7 comments