symptoms
Raspberry Pi Desktop tried a full scan using Clam AV, but bash was interrupted by the error below.
=========================================
Sunday, November 22, 2020 08:15:59 JST
raspberrypi
LibClamAV Error: cli_tgzload: File daily.ldb not correctly loaded
LibClamAV Error: Can't load/var/lib/clamav/daily.cld: Malformed database
LibClamAV Error: cli_loaddbdir(): error loading database/var/lib/clamav/daily.cld
ERROR:Malformed database
Expectations
Complete the full scan with ClamAV
Reproduction Steps
Create a file with the shell script below
#!/bin/sh
echo=========================================
date
hostname
clamscan /\
--infected\
--recursive\
--log=/var/log/clamav/clamscan.log\
--move=/var/log/clamav/virus\
-- exclude-dir=^/boot\
-- exclude-dir=^/sys\
-- exclude-dir=^/proc\
-- exclude-dir=^/dev\
-- exclude-dir=^/var/log/clamav/virus
# -- Only files that detect infected infections are printed as results
# -- Recursive inspection of the directory below the recursive description Unzip and inspect the compressed file
# --log=FILE log file
# --move=Isolate the file that detected the DIR infection to
# --remove Delete Infection Detected Files
# -- exclude=FILE inspection exclusion file (specified by pattern)
# -- exclude-dir=DIR inspection exclusion directory (specified by pattern)
if[$?=0]; then
echo "Virus not detected."
else
echo "Virus detection!"
fi
Grant Run Permissions
$sudo chmod+x/opt/script/clam-full.sh
Create a folder for virus isolation
$sudomkdir/var/log/clamav/virus
Run
$sudo/opt/script/clam-full.sh
What I've tried and looked into so far
When I ran freshclam
, I vomited the following error
ERROR:/var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile=/var/log/clamav/freshclam.log).
ERROR:initialize:libfreshclam init failed.
ERROR—Initialization error!
cli_tgzload: File daily.ldb not correctly loaded
but no valid information was obtained
Removed /var/lib/clamav/daily.cld
.
The scan was successful.
Thank you!
------------- SCAN SUMMARY -------------
Known viruses: 4564997
Engine version—0.102.4
Scanned directories:11650
Scanned files: 106891
Infected files:0
Data scanned—6151.45 MB
Data read: 5793.59 MB (ratio 1.06:1)
Time: 1876.573 sec (31 m 16 s)
virus undetected
© 2024 OneMinuteCode. All rights reserved.