Changes

From Amahi Wiki
Jump to: navigation, search
2,061 bytes added ,  21:09, 19 July 2014
Created page with "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 configu..."
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.

==== Install ====
* Install required ClamAV packages
yum install clamav clamav-update
* Edit /etc/freshclam.conf and make the following changes:
** Comment out “Exemple”
** Uncomment lines
*** “DNSDatabaseInfo current.cvd.clamav.net”
*** “DatabaseMirror db.XY.clamav.net” (replace XY with your [http://www.iana.org/cctld/cctld-whois.htm country code])
** Ensure line “DatabaseMirror database.clamav.net” is uncommented
* Update ClamAV’s signatures
/usr/bin/freshclam

'''NOTE:''' ClamAV will update automatically, as part of /etc/cron.daily/freshclam.

==== Configure Daily Scan ====
In this example, we will configure a cronjob to scan the /home/ directory every day:
* Create cron file:
vim /etc/cron.daily/manual_clamscan
* Add the following to the file above. Be sure to change SCAN_DIR to the directory that you want to scan:
#!/bin/bash
SCAN_DIR="/var/hda/files/Pictures"
LOG_FILE="/var/log/clamav/manual_clamscan.log"
/usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE
* Give our cron script executable permissions:
chmod +x /etc/cron.daily/manual_clamscan

You can even run the above script to ensure that it works correctly.

And you’re done! That should be the minimum required to install ClamAV and Perform a daily scan of a specific directory.


<u>Reference:</u> [https://www.centosblog.com/how-to-install-clamav-and-configure-daily-scanning-on-centos/ How to Install ClamAV and Configure Daily Scanning on CentOS]

==== Using Greyhole ====
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>

Now when the daily scan runs, it will scan the Greyhole enabled share correctly.
12,424

edits