Symptoms
The clamd service is failing to start with an error like the following.
Startup Log
LibClamAV Error: cli_tgzload: Invalid checksum for file daily.hsb
LibClamAV Error: Can't load /usr/local/cpanel/3rdparty/share/clamav/daily.cld: Malformed database
ERROR: Malformed database
Description
This error indicates that the database file daily.cld for the ClamAV virus definitions has become corrupted and cannot be loaded during startup. This can commonly occur if the data files have been unexpectedly altered or an update through freshclam was prematurely interrupted.
Workaround
To repair the database you will first need to move the current database files out of the way so that they can be recreated. Using the provided example, the following command will move the file daily.cld to a backup location using the current date. If the startup error referenced a different file, that one will need to be moved instead.
mv /usr/local/cpanel/3rdparty/share/clamav/daily.cld{,.$( date +%Y%m%d )}
Once the corrupted database file has been moved, you will need to initiate a freshclam to download the updated database information to rebuild it.
/usr/local/cpanel/3rdparty/bin/freshclam
After this the service will be expected to start normally using the restartsrv script below.
/scripts/restartsrv_clamd
Comments
0 comments
Article is closed for comments.