How can I fix the error: Parse error at /etc/clamav/clamd.conf Unknown option ScanImage?

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.

  1. Update the package repository index.
  2. Upgrade the core ClamAV components.
  3. 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.

  • ScanImage, ScanImageFuzzyHash
  • 0 Pengguna Menemukan Ini Berguna
Adakah jawapan ini membantu?

Artikel Berkaitan

How can I fix the error: Host '127.0.0.1' is not allowed to connect to this MariaDB server?

Overview This article provides resolution steps for the MariaDB connection error Host...

How can I fix the error: The domain limit of this license key has been reached?

Overview The Admin and Pro editions of Danami products enforce a maximum domain limit within the...

After upgrading from Centos 7 to AlmaLinux 8 Amavis is treating mail with low scores as spam. How can I fix this?

Overview Following an upgrade from CentOS 7 to AlmaLinux 8, Amavis may incorrectly classify...

How can I fix empty mail log information in Warden?

Overview Warden relies on the systemd-journal to retrieve and display mail log information. If...