All HowTo's Cybersecurity Linux Redhat, Fedora and CentOS Linux

ClamAV on CentOS7/Redhat7 – Periodic disk scans

This article explains how to install and configure periodic scans with ClamAV on CentOS7 or Redhat (RHEL) 7 servers. Much of this came from “”.

I’ve updated this article with a work-around for the (seemingly common) cron issue. Clamscan doesn’t seem to run from “/etc/cron.d/whatever” but does from “crontab -e”.

Install the required packages. Note that you need the EPEL repo’s available first. Do that here “”.

yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd

Hash out the “Example” commands in “/etc/clamd.d/scan.conf” and “/etc/freshclam.conf”.

Update the AV. This wont work unless you’ve done the step above:


Have the AV scan run daily 9at 3:am) and email the results to the sysadmin:

crontab -e

Add the following entry:

0 3 * * * /bin/freshclam ; /bin/clamscan / --recursive=yes -i > /tmp/clamav.log ; mail -s clamav_log_`hostname` [email protected] < /tmp/clamav.log

Now you’re done.


  1. Hi everybody !

    How can clamav scan other users’ files if it is not root?
    Did you have an idea?
    I thank you in advance for your answers,

    Sincerely Zak

Leave a Reply

Your email address will not be published. Required fields are marked *