[Bug 1865511] Re: Clamav package should contain clamav-daemon
Andreas Hasenack
andreas at canonical.com
Tue Mar 3 20:16:17 UTC 2020
apt install clamav on eoan brings in:
clamav clamav-base clamav-freshclam libclamav9 libltdl7 libtfm1
The freshclam daemon tries to download the databases right away:
Tue Mar 3 20:01:42 2020 -> freshclam daemon 0.102.2 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Tue Mar 3 20:01:42 2020 -> ClamAV update process started at Tue Mar 3 20:01:42 2020
Tue Mar 3 20:01:42 2020 -> daily database available for download (remote version: 25740)
Tue Mar 3 20:02:12 2020 -> WARNING: Download failed (28) Tue Mar 3 20:02:12 2020 -> WARNING: Message: Timeout was reached
Tue Mar 3 20:02:12 2020 -> WARNING: getcvd: Can't download daily.cvd from https://database.clamav.net/daily.cvd
Tue Mar 3 20:02:12 2020 -> Trying again in 5 secs...
While that is happening, clamscan won't work:
root at e1:~# clamcsc^C
root at e1:~# clamscan
LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav
ERROR: Can't open file or directory
Which is expected.
It will keep trying. In my case, now it managed to download daily:
Tue Mar 3 20:03:11 2020 -> Testing database: '/var/lib/clamav/tmp.3f047/clamav-323978c4ffb272b6b680262710a2e099.tmp-daily.cvd' ...
Tue Mar 3 20:03:16 2020 -> Database test passed.
Tue Mar 3 20:03:16 2020 -> daily.cvd updated (version: 25740, sigs: 2204413, f-level: 63, builder: raynman)
And it's trying main again. That's a big file, over 100Mb in size. I
believe that's why I'm getting timeouts, as I can't receive such a big
file in 30s, which is the default ReceiveTimeout in
/etc/clamav/freshclam.conf:
ReceiveTimeout 30
Once I updated that to 300s, and restarted the freshclam daemon, it
fetched the main database just fine:
Tue Mar 3 20:08:15 2020 -> main database available for download (remote version: 59)
Tue Mar 3 20:10:09 2020 -> Testing database: '/var/lib/clamav/tmp.393b2/clamav-bcd674e3559e38c5a502dfe72b8bf48c.tmp-main.cvd' ...
Tue Mar 3 20:10:13 2020 -> Database test passed.
Tue Mar 3 20:10:13 2020 -> main.cvd updated (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
Tue Mar 3 20:10:13 2020 -> bytecode database available for download (remote version: 331)
Tue Mar 3 20:10:15 2020 -> Testing database: '/var/lib/clamav/tmp.393b2/clamav-99166262d870f9b5d36574c18189bea1.tmp-bytecode.cvd' ...
Tue Mar 3 20:10:15 2020 -> Database test passed.
Tue Mar 3 20:10:15 2020 -> bytecode.cvd updated (version: 331, sigs: 94, f-level: 63, builder: anvilleg)
Tue Mar 3 20:10:15 2020 -> ERROR: NotifyClamd: Can't find or parse configuration file /etc/clamav/clamd.conf
The last error about NotifyClamd is also expected, since I didn't
install the clamd daemon.
clamscan now works:
root at e1:~# clamscan
/root/.viminfo: OK
/root/.profile: OK
/root/.lesshst: OK
/root/.bashrc: OK
----------- SCAN SUMMARY -----------
Known viruses: 6759121
Engine version: 0.102.2
Scanned directories: 1
Scanned files: 4
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 12.184 sec (0 m 12 s)
Regarding this bug then:
1) clamav-data should no longer be mentioned in d/control indeed, as this package doesn't exist anymore.
2) clamav-freshclam could be made a bit better by increasing the ReceiveTimeout, but by how much I'm not sure. It depends on your internet connection. In my case, the main.cvd database was downloaded in about 2 minutes. Note that after this first download, only the dailies are necessary, which are much smaller.
There is no need to install clamav-daemon to fix the above. It serves
specific purposes, as outlined in its description.
** Summary changed:
- Clamav package should contain clamav-daemon
+ Tweak freshclam ReceiveTimeout value for slow internet connections
** Changed in: clamav (Ubuntu)
Status: New => Triaged
** Changed in: clamav (Ubuntu)
Importance: Undecided => Low
** CVE added: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-3123
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to clamav in Ubuntu.
https://bugs.launchpad.net/bugs/1865511
Title:
Tweak freshclam ReceiveTimeout value for slow internet connections
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/1865511/+subscriptions
More information about the Ubuntu-server-bugs
mailing list