Bug 815692 - RFE: Provide clamav diskscan service
Summary: RFE: Provide clamav diskscan service
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: clamav
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Gerald Cox
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-24 09:43 UTC by Marko Myllynen
Modified: 2017-03-28 20:14 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-28 20:14:32 UTC
Type: Bug


Attachments (Terms of Use)

Description Marko Myllynen 2012-04-24 09:43:51 UTC
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 21:05:42 UTC
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 17:20:38 UTC
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 17:26:41 UTC
Researching...

Comment 4 Gerald Cox 2017-03-28 20:14:32 UTC
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.