Overview
The clamav-daemon.service may fail to start due to unrecognized configuration directives within the ClamAV configuration file. This issue typically occurs when a newer version of Warden introduces configuration options that are incompatible with an older installed version of ClamAV on Debian 11 or Debian 12 systems.
Error Symptoms
When attempting to start or restart the service, you may encounter the following error messages in the system journal:
Feb 04 17:31:52 debian-ecodms-Stegmann systemd[1]: clamav-daemon.service: Failed with result 'exit-code'.
Feb 04 17:31:52 debian-ecodms-Stegmann systemd[1]: Starting Clam AntiVirus userspace daemon...
Feb 04 17:31:52 debian-ecodms-Stegmann systemd[1]: Started Clam AntiVirus userspace daemon.
Feb 04 17:31:52 debian-ecodms-Stegmann clamd[3444]: ERROR: Parse error at /etc/clamav/clamd.conf:112: Unknown option ScanImage
Feb 04 17:31:52 debian-ecodms-Stegmann clamd[3444]: ERROR: Can't open/parse the config file /etc/clamav/clamd.conf
Feb 04 17:31:52 debian-ecodms-Stegmann systemd[1]: clamav-daemon.service: Main process exited, code=exited, status=1/FAILURE
Feb 04 17:31:52 debian-ecodms-Stegmann systemd[1]: clamav-daemon.service: Failed with result 'exit-code'.
Feb 04 17:31:52 debian-ecodms-Stegmann systemd[1]: clamav-daemon.service: Start request repeated too quickly.
Root Cause
This behavior is caused by a known compatibility issue in Warden version 5.06. The software automatically appends the ScanImage and ScanImageFuzzyHash directives to /etc/clamav/clamd.conf. These options were introduced in ClamAV 1.4.0; however, Debian 11 and Debian 12 repositories may default to an older release (e.g., ClamAV 1.07), which does not recognize these parameters.
Resolution Steps
To resolve this issue, upgrade the ClamAV packages to version 1.4.3 or later. This ensures compatibility with the configuration directives managed by Warden and allows the daemon to initialize correctly.
- Update the package repository index.
- Upgrade the core ClamAV components.
- Restart the ClamAV daemon service.
apt-get update
apt-get upgrade clamav clamav-base clamav-daemon clamav-freshclam
systemctl restart clamav-daemon
Troubleshooting & Verification
After applying the package upgrades, verify that the service is running correctly by checking its status:
systemctl status clamav-daemon
If the service continues to fail after upgrading, review the system logs for additional error details and ensure that no residual configuration conflicts exist within /etc/clamav/clamd.conf.