You are not logged in.

#1 2020-01-01 05:42:00

lilgman
New Member
Registered: 2019-11-09
Posts: 3

ClamAV virus signatures won't update

I needed to download a file to be used in a Windows virtual machine today, and want to scan it for viruses.  I installed clamtk for this.  Unfortunately updating/adding the signatures fails.  I've purged, re-installed, purged and only have clamav installed now. No error messages with the installation, but still no luck.  I'm wondering if anyone can help me sort this.

@debian:~$ sudo freshclam
[sudo] password for xxxxx: 
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
@debian:~$ sudo cat /etc/clamav/freshclam.conf
# Automatically created by the clamav-freshclam postinst
# Comments will get lost when you reconfigure the clamav-freshclam package

DatabaseOwner clamav
UpdateLogFile /var/log/clamav/freshclam.log
LogVerbose false
LogSyslog false
LogFacility LOG_LOCAL6
LogFileMaxSize 0
LogRotate true
LogTime true
Foreground false
Debug false
MaxAttempts 5
DatabaseDirectory /var/lib/clamav
DNSDatabaseInfo current.cvd.clamav.net
ConnectTimeout 30
ReceiveTimeout 30
TestDatabases yes
ScriptedUpdates yes
CompressLocalDatabase no
SafeBrowsing false
Bytecode true
NotifyClamd /etc/clamav/clamd.conf
# Check for new database 24 times a day
Checks 24
DatabaseMirror db.local.clamav.net
DatabaseMirror database.clamav.net

Here's the last few lines of sudo cat /var/log/clamav/freshclam.log

Tue Dec 31 21:38:16 2019 -> Received signal: wake up
Tue Dec 31 21:38:16 2019 -> ClamAV update process started at Tue Dec 31 21:38:16 2019
Tue Dec 31 21:38:16 2019 -> daily database available for download (remote version: 25680)
Tue Dec 31 21:38:16 2019 -> ERROR: downloadFile: Can't create new file /var/lib/clamav/tmp/clamav-bf0f1a9bc865f32db6bd3e59fcb8a052.tmp in /var/lib/clamav
Tue Dec 31 21:38:16 2019 -> Hint: The database directory must be writable for UID 120 or GID 127
Tue Dec 31 21:38:16 2019 -> WARNING: getcvd: Can't download daily.cvd from https://database.clamav.net/daily.cvd
Tue Dec 31 21:38:16 2019 -> ERROR: Unexpected error when attempting to update database: daily
Tue Dec 31 21:38:16 2019 -> WARNING: fc_update_databases: fc_update_database failed: Failed to read/write file to database directory (10)
Tue Dec 31 21:38:16 2019 -> ERROR: Database update process failed: Failed to read/write file to database directory (10)
Tue Dec 31 21:38:16 2019 -> ERROR: Update failed.
Tue Dec 31 21:38:16 2019 -> --------------------------------------

The log file contains lots more of the same. 

@debian:~$ ls -la /var/lib/clamav
total 8
drwxr-xr-x  2 clamav clamav 4096 Dec 31 21:49 .
drwxr-xr-x 59 root   root   4096 Dec 31 08:34 ..

I'm running Debian Testing and Lithium.
Any ideas what to do?

Offline

#2 2020-01-01 06:15:00

damo
....moderator....
Registered: 2015-08-20
Posts: 5,403

Re: ClamAV virus signatures won't update

Did you google the error messages? The first hit I got was https://forum.directadmin.com/threads/c … log.46400/, which suggests

chown -R clamav:clamav /var/log/clamav

Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2020-01-02 06:37:01

lilgman
New Member
Registered: 2019-11-09
Posts: 3

Re: ClamAV virus signatures won't update

Thanks for the reply, Damo. I also saw that.

ls -la /var/log/clamav
total 32
drwxr-xr-x  2 clamav clamav  4096 Dec 31 20:20 .
drwxr-xr-x 16 root   root    4096 Jan  2 08:31 ..
-rw-r-----  1 clamav adm        0 Dec 31 20:20 clamav.log
-rw-r-----  1 clamav adm    19927 Jan  1 08:20 freshclam.log

Should I chown the actual log files to clamav:clamav too?

This is my first time that things didn't work "out of the box" with Debian.

Offline

#4 2020-01-02 06:49:05

lilgman
New Member
Registered: 2019-11-09
Posts: 3

Re: ClamAV virus signatures won't update

Thanks, Damo.  I think it's working now.  After a quick read of the chown man file, I did this.

sudo chown -R clamav:clamav /var/log/clamav

Then when I ran freshclam, I got a message about /var/log/clamav/freshclam.log being locked or open by another user.  The lsof command identified the user which I killed.  I will have to adjust the receive timeout for slow African internet connections, though.

Is this a bug in clamav? 

I appreciate the help!

Offline

Board footer

Powered by FluxBB