3

On Ubuntu 18.04 server a socket file is created when starting clamav-daemon without problem. On an older server using the 16.04.6 LTS the socket file is just not created whatever I tried. Even I create it first according to the answer posted here ClamAV: clamd.ctl file is not getting created on ubuntu, it will disappear, when clamd starts. I also did a purge of all clamav packages and reinstalled them, same behaviour.

I figured out the clamd-version is one day and one build older in Ubuntu 16.04.6 than clamav.

16.04.6 LTS:

$ clamd --version
ClamAV 0.101.4/25612/Thu Oct 24 10:59:15 2019
$ clamscan --version
ClamAV 0.101.4/25613/Fri Oct 25 11:00:25 2019

whereas it is the same on 18.04.3 LTS:

$ clamd --version
ClamAV 0.101.4/25613/Fri Oct 25 11:00:25 2019
$ clamscan --version
ClamAV 0.101.4/25613/Fri Oct 25 11:00:25 2019

Will the build one day later fix this problem? I tried to install the clamav-daemon for Ubuntu 18.04 on the 16.04 but it failed due to dependencies.

The configuration seems OK

$ cat /etc/clamav/clamd.conf | grep Socket
LocalSocket /var/run/clamav/clamd.ctl
FixStaleSocket true
LocalSocketGroup clamav
LocalSocketMode 666

but no socket file for clamd is created.

$ ls -l /var/run/clamav/
total 4
srw-rw-rw- 1 clamav clamav 0 Okt 26 08:12 clamav-milter.ctl
-rw-r--r-- 1 clamav clamav 4 Okt 26 08:12 clamav-milter.pid

Thus, as a consequence, amavisd-new is unable to connect to clamd via the socket. How to get the socket for clamd on Ubuntu 16.04.6 LTS?

2 Answers2

2

I resolved this problem today by reconfiguring clamav-daemon:

dpkg-reconfigure clamav-daemon

Even without changing any values that seemed to kick something and get it working again.

cpeel
  • 21
0

Clamav daemon may take really long time to start, or better to load signatures. On one of my systems, it is taking more than 6 minutes.

And, socket is unfortunately created only after everything is loaded.

Try to check log files if there is message similar to

Loaded 8794448 signatures.

And after that, there should be about twenty more lines. That is the moment when socket should appear.

Kepi
  • 375