Changes

From Amahi Wiki
Jump to: navigation, search
204 bytes added ,  01:05, 15 September 2015
no edit summary
ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats on Linux. In this article, we will only be configuring ClamAV to run scheduled/on-demand scans; not resident scans.
 
'''NOTE:''' This guidance is for Amahi 7/8, but can be easily adapted for Ubuntu.
== Install ==
And you’re done! That should be the minimum required to install ClamAV and Perform a daily scan of a specific directory.
 
'''NOTE:''' You will need to enable email on your HDA to use option "b". See [[Main_Page#Community_Tutorials|Community Tutorials]] for guidance.
== Configure Virus Definitions Update ==
The following will ensure your virus definitions are updated hourly. Perform * Execute the following as root user:
touch /var/log/clamav/freshclam.log
chmod 600 /var/log/clamav/freshclam.log
You will need to do some additional setup to scan files when using Greyhole.
* Set up [https://wiki.amahi.org/index.php/[Mount_Shares_Locally |mount shares locally]]
* Ensure the SCAN_DIR= <code>/mnt/samba/share</code> and not <code>/var/hda/files/share</code>
== Incremental Daily and Full Weekly Scans ==
You can expand on the above by making a daily cronjob script that only scans files changed in the last 24 hours, and a weekly cronjob script ("a" or "b" above) that does a full filesystem scan. You may choose to do this for reasons of efficiency, as scanning only the files changed in the last 24 hours is an order of magnitude faster. Your daily cron file would look something more like this:
<pre>#!/usr/bin/env bash
# Run clamscan against the list of files and pipe the results out to the results file
# -i prints only infected files, -f is the list of files to scan, and -l is the output log
clamscan -i -f "${LIST}" -l "${RESULTS}"# Send email with results (uncomment line below to enable)# mail -s "HDA Daily Virus Scan - ${DATE}" user@mail.com < ${RESULTS}</pre>
==References==
12,424

edits