In my bionic container, I installed clamav-daemon (and its dependencies) and it worked right out of the box.
Of note, however, is this extend.conf systemd file shown in systemctl status clamav-daemon:
root@bionic-clamav-1784193:~# systemctl status clamav-daemon
● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/clamav-daemon.service.d └─extend.conf
Active: inactive (dead)
Docs: man:clamd(8) man:clamd.conf(5) https://www.clamav.net/documents/
That file has the mkdir and chown commands you showed:
root@bionic-clamav-1784193:~# cat /etc/systemd/system/clamav-daemon.service.d/extend.conf
[Service]
ExecStartPre=-/bin/mkdir /run/clamav
ExecStartPre=/bin/chown clamav /run/clamav
That is created by clamav-daemon's postinst script, so it should have happened when you installed the package, unless that failed for some reason (not shown in this bug report).
These are the packages I have:
ii clamav 0.100.1+dfsg-1ubuntu0.18.04.2 amd64 anti-virus utility for Unix - command-line interface
ii clamav-base 0.100.1+dfsg-1ubuntu0.18.04.2 all anti-virus utility for Unix - base package
ii clamav-daemon 0.100.1+dfsg-1ubuntu0.18.04.2 amd64 anti-virus utility for Unix - scanner daemon
ii clamav-freshclam 0.100.1+dfsg-1ubuntu0.18.04.2 amd64 anti-virus utility for Unix - virus database update utility
ii libclamav7:amd64 0.100.1+dfsg-1ubuntu0.18.04.2 amd64 anti-virus utility for Unix - library
Can you try removing your workaround, and reinstalling the packages? And check if that extend.conf file is created, and/or if there is some error during postinst?
The only thing I saw when installing it was a harmless id command showing that the clamav user doesn't exist at the time of installation:
...
Setting up clamav-base (0.100.1+dfsg-1ubuntu0.18.04.2) ...
id: ‘clamav’: no such user
Processing triggers for ureadahead (0.100.0-20) ...
...
In my bionic container, I installed clamav-daemon (and its dependencies) and it worked right out of the box.
Of note, however, is this extend.conf systemd file shown in systemctl status clamav-daemon: clamav- 1784193: ~# systemctl status clamav-daemon daemon. service - Clam AntiVirus userspace daemon system/ clamav- daemon. service; enabled; vendor preset: enabled) system/ clamav- daemon. service. d
└─extend. conf
man: clamd.conf( 5) /www.clamav. net/documents/
root@bionic-
● clamav-
Loaded: loaded (/lib/systemd/
Drop-In: /etc/systemd/
Active: inactive (dead)
Docs: man:clamd(8)
https:/
That file has the mkdir and chown commands you showed: clamav- 1784193: ~# cat /etc/systemd/ system/ clamav- daemon. service. d/extend. conf -/bin/mkdir /run/clamav /bin/chown clamav /run/clamav
root@bionic-
[Service]
ExecStartPre=
ExecStartPre=
That is created by clamav-daemon's postinst script, so it should have happened when you installed the package, unless that failed for some reason (not shown in this bug report).
These are the packages I have: dfsg-1ubuntu0. 18.04.2 amd64 anti-virus utility for Unix - command-line interface dfsg-1ubuntu0. 18.04.2 all anti-virus utility for Unix - base package dfsg-1ubuntu0. 18.04.2 amd64 anti-virus utility for Unix - scanner daemon dfsg-1ubuntu0. 18.04.2 amd64 anti-virus utility for Unix - virus database update utility dfsg-1ubuntu0. 18.04.2 amd64 anti-virus utility for Unix - library
ii clamav 0.100.1+
ii clamav-base 0.100.1+
ii clamav-daemon 0.100.1+
ii clamav-freshclam 0.100.1+
ii libclamav7:amd64 0.100.1+
Can you try removing your workaround, and reinstalling the packages? And check if that extend.conf file is created, and/or if there is some error during postinst?
The only thing I saw when installing it was a harmless id command showing that the clamav user doesn't exist at the time of installation: 1+dfsg- 1ubuntu0. 18.04.2) ...
...
Setting up clamav-base (0.100.
id: ‘clamav’: no such user
Processing triggers for ureadahead (0.100.0-20) ...
...