How to set your time for Maldet Cron on CentOS 7 server?

bhawanisingh

Administrator
Staff member
As we all know maldet automatically runs every day on your CentOS server as it is placed at "etc/cron.daily/maldet".
It runs automatically by the server without your control.

If you want to run this at any specific time then you can do it by 2 ways.

We will start with the first one.
You can just simply move your "maldet" file from "/etc/cron.daily" to "/var/spool/" folder.
Then, create a cron for root user "/var/spool/cron/root" as per your need like:
0 22 * * * /var/spool/maldet
This cron will run at 10 PM.

Now the second method you can implement is:
You can set 0000 permission for maldet file "etc/cron.daily/maldet".
Then set a cron for root user "/var/spool/cron/root" as per your need like:
0 22 * * * /usr/local/maldetect/maldet -b -r /home?/?/public_html/,/var/www/html/,/usr/local/apache/htdocs/ 1 >> /dev/null 2>&1
This cron will run at 10 PM.
 
Last edited by a moderator:
Top