Open SuperKaninchen opened 3 years ago
As you noticed, the clamav database directory (in this case /var/lib/clamav
) is owned by the clamav
user. You will need to start freshclam
as root, either using sudo freshclam
or starting it in daemon mode with systemd. freshclam
will switch from the root
user to the clamav
user on startup so it can update the database directory.
Note: I noticed that the docs are (at least for me) incorrect, as they mention the file clamd.conf multiple times, but the contents of mine (generated via clamconf) state:
ERROR: Unknown config file Available options: clamd.d/scan.conf freshclam.conf mail/clamav-milter.conf
Regarding this, the Fedora package maintainer a while back had some opinions about how clamav should be installed and renamed our config files and put them in subdirectories. Our documentation reflects the official clamav behavior. You will have to ask Fedora for help with their customizations.
As indicated by
[root@host]# freshclam
I did run it as root.
Starting it in daemon mode using freshclam -d
leads to no output to the console (as expected from a daemon), but the log file is empty too, and the files in /var/lib/clamav
stay unchanged
I'm still a little stumped then. I've looked at this a couple time since and am unsure how to response. Did you learn anymore since your lost comment about what's going wrong here?
If you run id -u clamav
does it say 980
?
Similar issue: ClamAV update process started at Thu Sep 19 14:42:26 2024 daily database available for update (local version: 27397, remote version: 27403) Current database is 6 versions behind. Downloading database patch # 27398... Time: 0.3s, ETA: 0.0s [========================>] 4.16KiB/4.16KiB Downloading database patch # 27399... Time: 0.2s, ETA: 0.0s [========================>] 4.59KiB/4.59KiB Downloading database patch # 27400... Time: 0.2s, ETA: 0.0s [========================>] 3.25KiB/3.25KiB Downloading database patch # 27401... Time: 0.3s, ETA: 0.0s [========================>] 2.28KiB/2.28KiB Downloading database patch # 27402... Time: 0.2s, ETA: 0.0s [========================>] 5.93KiB/5.93KiB Downloading database patch # 27403... Time: 0.2s, ETA: 0.0s [========================>] 7.01KiB/7.01KiB ERROR: buildcld: Can't open /var/lib/clamav/tmp.0000000000/clamav-00000000000000000000000000000000.tmp for writing ERROR: updatedb: Incremental update failed. Failed to build CLD.
Running freshclam as root doesn't resolve it
I'm still a little stumped then. I've looked at this a couple time since and am unsure how to response. Did you learn anymore since your lost comment about what's going wrong here?
If you run
id -u clamav
does it say980
?
I just had this same issue and after reading the issue my id for clamav is 64 apparently. Why is that important and how can I change it if its necessary? Thanks ;)
$ id -u clamav
64
Describe the bug
Using the
freshclam
command without parameters yields an error:This is what the mentioned directory looks like:
So the directory referenced above is owned by the user clamav already, with read and write permissions set.
How to reproduce the problem
I followed the documentation for installation and configuration.
Output of clamav -n:
Note: I noticed that the docs are (at least for me) incorrect, as they mention the file
clamd.conf
multiple times, but the contents of mine (generated viaclamconf
) state: