Red Hat Bugzilla – Bug 815692
RFE: Provide clamav diskscan service
Last modified: 2017-03-28 16:14:32 EDT
Description of problem:
It would be beneficial if the ClamAV packages would include a "clamav-diskscan" service which would scan, if enabled, periodically local non-pseudo file systems (or perhaps just /home and temp/spool directories) with clamscan and report any possible findings / alerts to configured e-mail addresses and/or system logs.
That is, something like
# yum install clamav-diskscan
# chkconfig clamav-diskscan on
# service clamav-diskscan start
Would scan the predefined local filesystems daily or weekly and send e-mail to firstname.lastname@example.org if any suspicious files are found.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
You can install clamav as a service now.
Be sure to reference: https://bugzilla.redhat.com/show_bug.cgi?id=859339
You can also setup freshclam as a service. You will need to manually create:
# Run FreshClam as daemon
Description = freshclam scanner
After = network.target
Type = forking
ExecStart = /usr/bin/freshclam -d -c 4
Restart = on-failure
PrivateTmp = true
The other thing to watch out for is since clamav will be running as a daemon, and not as root, you'll need to ensure it is a member of the appropriate groups - otherwise you'll get permission errors. I've written a series of bash scripts to scan using the daemon - and if you do a google search, I'm sure there is more. I'll post my scripts to bitbucket:
Just download to a directory and execute viruscan. You also need to install figlet which is in the Fedora repo.
It's a work in progress, and not supported by Fedora, so if you have any questions/issues - post them in the bitbucket repo.