Bug 815692 - RFE: Provide clamav diskscan service
RFE: Provide clamav diskscan service
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: clamav (Show other bugs)
rawhide
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Gerald Cox
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-24 05:43 EDT by Marko Myllynen
Modified: 2017-03-28 16:14 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-28 16:14:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marko Myllynen 2012-04-24 05:43:51 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 root@localhost.localdomain if any suspicious files are found.
Comment 1 Fedora Admin XMLRPC Client 2013-02-27 16:05:42 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 2 Fedora Admin XMLRPC Client 2017-03-27 13:20:38 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Gerald Cox 2017-03-27 13:26:41 EDT
Researching...
Comment 4 Gerald Cox 2017-03-28 16:14:32 EDT
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:

/usr/lib/systemd/system/clam-freshclam.service

# Run FreshClam as daemon
[Unit]
Description = freshclam scanner
After = network.target

[Service]
Type = forking
ExecStart = /usr/bin/freshclam -d -c 4
Restart = on-failure
PrivateTmp = true

[Install]
WantedBy=multi-user.target

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:  
https://bitbucket.org/gbcox/clamav_utils/

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.

Note You need to log in before you can comment on or make changes to this bug.