Difference between revisions of "ClamAV"

From ArchWiki
Jump to: navigation, search
m (Don't use -Sy)
m (fixed redirect)
Line 2: Line 2:
 
{{i18n_links_start}}
 
{{i18n_links_start}}
 
{{i18n_entry|English|ClamAV}}
 
{{i18n_entry|English|ClamAV}}
{{i18n_entry|Español|Cómo instalar y configurar ClamAV Antivirus}}
+
{{i18n_entry|Español|ClamAV (Español)}}
 
{{i18n_links_end}}
 
{{i18n_links_end}}
  

Revision as of 18:23, 22 January 2010

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n links end

Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX. It provides a number of utilities including a flexible and scalable multi-threaded daemon, a command line scanner and advanced tool for automatic database updates. Because ClamAV's main use is on file/mail servers for Windows desktops it primarily detects Windows viruses and malware.

Installation

Install with pacman by:

# pacman -S clamav

Configuration

Whether you are going to use clamav as a daemon or use it as a simple file checker you need to comment out Example in the Template:Filename file(you probably need to do the same to Template:Filename in the same dir too) and update the virus & malware database.

Update Database

The daemon needs to be running for the virus update to be updated:

# /etc/rc.d/clamav start

Then update the virus definitions with:

# freshclam

The database files are saved in:

/var/lib/clamav/daily.cvd
/var/lib/clamav/main.cvd

Server setup

To run as a server edit Template:Filename and Template:Filename and comment out the Example flag. In Template:Filename change the start options from "no" to "yes".

# change these to "yes" to start
START_FRESHCLAM="yes"
START_CLAMD="yes"

Scan for Viruses

Template:Codeline can be used to scan certain files, home directory, or an entire system:

$ clamscan myfile
$ clamscan -r -i /home
$ clamscan -r -i --exclude-dir=^/sys\|^/proc\|^/dev /

If you'd like Template:Codeline to remove the infected file use the Template:Codeline option in the command.

Troubleshooting

If you get the following messages after running freshclam:

WARNING: Clamd was NOT notified: Can't connect to clamd through 
/var/lib/clamav/clamd.sock connect(): No such file or directory

Add a sock file for clamav:

# touch /var/lib/clamav/clamd.sock
# chown clamav:clamav /var/lib/clamav/clamd.sock

If you get the next error when starting the daemon:

LibClamAV Error: cli_loaddb(): No supported database files found
in /var/lib/clamav ERROR: Not supported data format

Run freshclam as root:

# freshclam -v