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:
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:
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:
This cron will run at 10 PM.0 22 * * * /var/spool/maldet
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:
This cron will run at 10 PM.0 22 * * * /usr/local/maldetect/maldet -b -r /home?/?/public_html/,/var/www/html/,/usr/local/apache/htdocs/ 1 >> /dev/null 2>&1
Last edited by a moderator: