[Pkg-clamav-devel] Bug#775400: Bug#775400: clamav-freshclam: freshclam cant download virus definitions

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Fri Jan 16 22:59:23 UTC 2015


Hi Sebastian,

On 16.01.2015 21:45, Sebastian Andrzej Siewior wrote:
> On 2015-01-15 23:50:02 [+0100], Andreas Cadhalpun wrote:
>> I can reproduce this in a minimal jessie chroot with:
>> # apt install clamav-base
>> # apt remove clamav-base
>> # apt install clamav-base
>
> Hah. How so? After my remove, "/var/lib/clamav/" was still owned by
> clamav:clamav. But this was on my working sid.

The directory /var/lib/clamav is only removed by dpkg if it is empty.

>> This can be worked around with:
>> # apt purge clamav-base
>> # apt install clamav-base
>>
>> The problem is that clamav-base.postinst calls chown only on fresh
>> installations. This should be easy to fix by moving the chown calls out of
>> the 'if [ -z "$2" ]'.
>
> Isn't this also done as part of debconf? The user can be changed via debconf so
> ideally it should also chown the folder. And I think we did this. Or we
> wanted to split debconf from clamav-base to daemon and freshclam.

Debconf can only be used to change under which user clamd is run.
The dbowner is hardcoded to clamav in clamav-freshclam.postinst, but 
could theoretically be changed if one modifies the DatabaseOwner field 
in /etc/clamav/freshclam.conf.
However, in that case one would have to chown /var/lib/clamav manually.

Therefore I think it is sufficient to let clamav-base.postinst always 
chown /var/lib/clamav to clamav:clamav.

Best regards,
Andreas



More information about the Pkg-clamav-devel mailing list