ClamAV Daemon Start Condition Failed – Troubleshooting Guide

anti-virusclamavemail-serverlinuxsystemctl

After installing Modoboa(Open Source Mail Hosting), I Tried to start clamav-daemon, but i faced start condition failed.

    systemctl status clamav-daemon.service
    clamav-daemon.service - Clam AntiVirus userspace daemon
   Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/clamav-daemon.service.d
           └─extend.conf
   Active: inactive (dead)
Condition: start condition failed at Fri 2021-01-15 04:19:06 EST; 33min ago
           └─ ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc} was not met

Below it showed the problem, conditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc} was not met.
I couldn't start the service with systemctl or other commands.
After some troubleshoots, I found out that /var/lib/clamav is empty and there should be some .cvd update file.
Also I couldn't update the clamav with this command (show me 403 error):

sudo clamav-freshclam

what can I do now?

Best Answer

After some sort of tries, finally I downloaded daily.cvd and main.cvd manually with wget command directly from clamav.net/downloads and move them to my server with scp command and put them to /var/lib/clamav , then restart service and it worked!

systemctl restart clamav-daemon.service
systemctl status clamav-daemon.service
    clamav-daemon.service - Clam AntiVirus userspace daemon
   Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/clamav-daemon.service.d
           └─extend.conf
   Active: active (running)