Symptoms
The following errors are received by email and when executing the freshclam command on the Plesk server:
ERROR: cdiff_apply: lseek(desc, -350, SEEK_END) failed
ERROR: downloadPatch: Can't apply patch
Cause
A ClamAV database is absent in the directory /var/lib/clamav.
Resolution
-
Connect to the server via SSH.
-
Check the databases available:
# ls -la /var/lib/clamav/*.cvd
Note: There should be 3 files:
bytecode.cvddaily.cvdmain.cvd -
Download the missing database using the native ClamAV utility:
# freshclam
-
If the utility shows error and the required database is still absent, download the absent file from the link http://database.clamav.net/<database_name>.cvd (i.e. http://database.clamav.net/daily.cvd) and upload it on the server.
Note: using
wgetutility to download the database may result in error 403. If it appears try downloading the database to your local PC first and then transfer it to the server, e.g. by using FTP client. -
Set the proper permissions:
# chown clamupdate:clamupdate /var/lib/clamav/daily.cvd
# chmod 0644 /var/lib/clamav/daily.cvd