ClamAV Configuration

  • Configuration File
All configuration for clamav is done in the clamd.conf and freshclam.conf files located in /etc. Please refer to the clamav documentation for a full explanation of each option.
shell> cat /etc/clamd.conf
LogFile /var/log/clamav/clamd.log
LogFileMaxSize 0
LogTime
LogSyslog
PidFile /var/run/clamav/clamd.pid
TemporaryDirectory /tmp
DatabaseDirectory /var/lib/clamav
FixStaleSocket
TCPSocket 3310
TCPAddr 127.0.0.1
MaxConnectionQueueLength 30
MaxDirectoryRecursion 15
User clamav
AllowSupplementaryGroups
ScanPE
DetectBrokenExecutables
ScanOLE2
ScanMail
ScanHTML
ScanArchive
ArchiveMaxFileSize 10M
ArchiveMaxRecursion 5
ArchiveMaxFiles 1000
ArchiveMaxCompressionRatio 200
shell> cat /etc/freshclam.conf
DatabaseDirectory /var/lib/clamav
UpdateLogFile /var/log/clamav/freshclam.log
DatabaseOwner clamav
DNSDatabaseInfo current.cvd.clamav.net
DatabaseMirror db.us.clamav.net
DatabaseMirror database.clamav.net
MaxAttempts 3
Checks 24
NotifyClamd /etc/clamav.conf
Note : The configuration below assumes you have installed ClamAV using the RPM I've provided. If you install via source, you may need to tweak some of the permissions on the directories. If someone wants to write up detailed documentation for the source install, I'd be more than happy to post it and give credit.
  • Starting clamd and freshclam
Just like spamassassin, we want to make sure that clamd and freshclam (the virus definition updater) are set to start on a reboot. I'm assuming an RPM install here, see the clamav documentation for other options.
rootshell> chkconfig --list clamd
clamd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rootshell> chkconfig --list freshclam
freshclam 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rootshell> chkconfig clamd on
rootshell> chkconfig freshclam on
rootshell> chkconfig --list clamd
clamd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rootshell> chkconfig --list freshclam
freshclam 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rootshell> service clamd start
Starting clamd: [ OK ]
rootshell> service freshclam start
Starting freshclam: [ OK ]


Page last modified on December 28, 2006, at 06:52 PM

Warning: fopen(wiki.d/.flock): failed to open stream: Permission denied in /var/www/html/pmwiki.php on line 638

PmWiki can't process your request

Cannot acquire lockfile

We are sorry for any inconvenience.

More information

Return to http://toaster.godshell.com/index.php