How to install and enable ClamAV

***** Note ***** Technical support for ClamAV is very limited. Use at your own risk.

To enable and install ClamAV execute the following commands:

da build set clamav yes     # enables ClamAV in custombuild config
da build clamav             # installs ClamAV

Exim integration can be optionally enabled with:

da build set clamav_exim yes
da build exim_conf

LibClamAV Error: cli_loaddb(): No supported database files found

If you get the following error when trying to start ClamAV:

# service clamd start
Starting clamd: LibClamAV Error: cli_loaddb(): No supported database files found in /usr/share/clamav
ERROR: Can't open file or directory

Or another related error:

LibClamAV Error: cl_load(): Can't get status of /usr/share/clamav

You can rebuild the database by using these commands:

cd /usr/share
mkdir -p clamav
chown clamav:clamav clamav
freshclam -v

How to completely uninstall ClamAV

To remove ClamAV and all related checks, completely disable checks first:

da build set clamav no
da build set clamav_exim no
da build set proftpd_uploadscan no
da build set pureftpd_uploadscan no
da build set suhosin_php_uploadscan no
da build set modsecurity_uploadscan no

Then remove the service:

da build remove_clamav

And rebuild related services:

da build exim_conf
da build proftpd    # if proftpd is used
da build pureftpd   # if pureftpd is used
da build rewrite_confs
Last Updated: