Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission on new install trying to run freshclam #1193

Closed
cgakers opened this issue Mar 2, 2024 · 13 comments
Closed

Permission on new install trying to run freshclam #1193

cgakers opened this issue Mar 2, 2024 · 13 comments

Comments

@cgakers
Copy link

cgakers commented Mar 2, 2024

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!
@ragusaa
Copy link
Contributor

ragusaa commented Mar 4, 2024

Hi,

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

@cgakers
Copy link
Author

cgakers commented Mar 4, 2024 via email

@ragusaa
Copy link
Contributor

ragusaa commented Mar 4, 2024

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

@cgakers
Copy link
Author

cgakers commented Mar 4, 2024 via email

@cgakers
Copy link
Author

cgakers commented Mar 4, 2024 via email

@ragusaa
Copy link
Contributor

ragusaa commented Mar 4, 2024

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.

@ragusaa
Copy link
Contributor

ragusaa commented Mar 4, 2024

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.

@cgakers
Copy link
Author

cgakers commented Mar 4, 2024 via email

@ragusaa
Copy link
Contributor

ragusaa commented Mar 4, 2024

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

Thanks,
Andy

@ragusaa ragusaa closed this as completed Mar 4, 2024
@ragusaa ragusaa reopened this Mar 5, 2024
@ragusaa
Copy link
Contributor

ragusaa commented Mar 5, 2024

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
Copy link
Author

cgakers commented Mar 5, 2024 via email

@micahsnyder
Copy link
Contributor

@cgakers okay to close this ticket?

@cgakers
Copy link
Author

cgakers commented May 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants