Mod_evasive access denied
On restarting cPanel server I encountered this issue:
usr/local/cpanel/scripts/restartsrv_*
Couldn't open logfile /var/log/apache2/mod_evasive/dos-46.250.238.224: Permission denied
So I did what I found in another thread from 6 years ago, as this couldn't be fixed:
https://support.cpanel.net/hc/en-us/community/posts/19132897643159--CPANEL-19869-Apache-mod-evasive-permissions
but I didn't want to up a ancient thread as normally this is not done on forums, and maybe things have changed.
I did chmod 1777 /var/log/apache2/mod_evasive and run the command again, same error.
The mod_evasive directory does not have any files by the way, it's empty.
So it seems that workaround isn't working anymore, or am I doing something wrong?
Can't remember having so many issues as I have now on a freshly installed cpanel server.
-
Hey there! Have you installed mod_evasive on the server? This isn't a package we include by default, although it is available in EasyApache. Can you run this command on the server to see the state of that package?
rpm -qa | grep -i evasive
0 -
Hello cPRex.
Yep I have installed mod_evasive myself.
Output of the requested line:
ea-apache24-mod_evasive-1.10.1-6.10.99.cpanel.x86_64
0 -
Thanks for confirming that is the case.
I checked a new AlmaLinux 9 installation and there is nothing in the /var/log/apache2/mod_evasive directory immediately after installing mod_evasive. Can you let me know the exact restart command you ran?
0 -
The restartcommand provided in my first post.
/usr/local/cpanel/scripts/restartsrv_*
0 -
I'm not sure that will work properly - if it did, that would attempt to restart everything on the server.
0 -
Exactly, I just wanted to restart everything and then it thew that error so hopefully mod_evasive is working correctly.
But seems I don't need the 1777 or is it better to keep that on the mod_evasive directory?0 -
I would never restart everything at once like that - with everything trying to restart at the same time you'll likely run into conflicts. It could be as simple as Apache and cPanel trying to restart at once that led to this error.
The folder should be 770 with root:nobody ownership, so I'd ensure that it what you have.
1 -
Oke so best is to start via the restart services in WHM then I presume.
I will set the folder back to 770. I didn't change ownership so it still has root:nobody as owner.
Thank you!
0 -
You can restart the services on the command line, just don't do them all at once.
0 -
Oke thank you.
I just picked this up from the cPanel docs somewhere which is why I thought this was oke too.
0
Please sign in to leave a comment.
Comments
10 comments