Closed TorstenEckern closed 6 months ago
Hi,
Thank you for putting the time in. I'll put in a ticket internally to create the directories and update the help messages for our next release.
Thanks, Andy
Hi,
The clamav team has decided that it is best to let the user create the directories with the permissions that they require, so freshclam will not be creating the directories for 'datadir'. We have updated the usage help and man pages to make this more clear to the user. Thank you for your ticket, the update will be in our next release.
Thanks, Andy
Describe the bug
The user is never notified that freshclam --datadir
How to reproduce the problem
I'm using the default clamav 0.103.11 apt package installed on Ubuntu 20.04 (tag: focal-20221130 -> linux/amd64) in a fresh docker container:
I run everything as root and directly after install of clamav-freshclam. ###########################
Second experiment: #############################
That solved the first problem, but we're not yet where we want to be. Apparently, directories are not being created recursively. From the docs and command output, this is not clear, so I did not expect that. This is the content of the newly created folder:
UID 105 and GID 107 belong to User and group clamav, respectively:
Third experiment, using the defaults: ############################
I'm on cooldown, but it does create the tmp directories! So why doesn't it do the same in my previous command?
Let's have a look at /var/lib/clamav:
This looks better, too. Permissions and ownership are identical.
Now the 4th step, using an absolute path: #############################
This works!!
Take home message: Please notify the user that freshclam --datadir
This cost me 1 day to find out. Thanks a lot for appreciating my effort ;)