Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net

Home Page:https://www.clamav.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Permission on new install trying to run freshclam

cgakers opened this issue · comments

pi-star@pi-star(ro):~$ sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:2 http://httpredir.debian.org/debian bullseye-backports InRelease
Hit:3 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Reading package lists... Done
pi-star@pi-star(rw):~$ sudo apt-get install clamav
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  libclamunrar clamav-docs
The following NEW packages will be installed:
  clamav
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/157 kB of archives.
After this operation, 585 kB of additional disk space will be used.
Selecting previously unselected package clamav.
(Reading database ... 46842 files and directories currently installed.)
Preparing to unpack .../clamav_0.103.10+dfsg-0+deb11u1_armhf.deb ...
Unpacking clamav (0.103.10+dfsg-0+deb11u1) ...
Setting up clamav (0.103.10+dfsg-0+deb11u1) ...
Processing triggers for man-db (2.9.4-2) ...
pi-star@pi-star(rw):~$ sudo freshclam
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!

Hi,

Have you verified that the directory /var/log/clamav exists and the user you are running freshclam as can write to it?

clamscan does take a few minutes to load the signatures, I would expect it to be longer on a raspberry pi. Could you try this

  1. Save 'X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*' to a string (no newline).
  2. run the command "clamscan -d /bytecode.cvd

The bytecode.cvd signature file is very small and should load really fast.

Also, could you run with '--debug' and upload the output?

Thanks,
Andy

You don't want to try and run that, the eicar string is used to test antivirus products. It should signature, but won't cause any damage. For a better explanation, check out https://www.eicar.org/download-anti-malware-testfile/

In your case, freshclam is not able to download signatures because your version of freshclam is too old. Our supported versions are on our downloads page here https://www.clamav.net/downloads. If there isn't a version there for your platform, your best bet is to contact your package maintainer or build from source.

If you are going to download from our downloads page, I would suggest going with 1.3 (latest), because 0.103 will be EOL'd later this year.

No problem. I am going to close this issue, but let us know if you have any other issues getting set up.

Thanks,
Andy

It just occurred to me that you could also try our docker image.
https://hub.docker.com/u/clamav
Documentation is here https://docs.clamav.net/manual/Installing/Docker.html

@cgakers okay to close this ticket?