Ubuntu 16.04.1; ClamAV 0.99 clamd.socket not created on start

Chris cpollock at embarqmail.com
Sun Aug 21 22:10:02 UTC 2016


On Sun, 2016-08-21 at 09:16 +0200, Ralf Mardorf wrote:
> On Sun, 21 Aug 2016 09:13:48 +0200, Ralf Mardorf wrote:
> > 
> > clamav:clamav
> I don't know if Ubuntu does use the same group name as Arch Linux
> does,
> you need to take care about this.
> 
> 
Ralf, thank you for all the information. I've been messing with this
most all of the day and I'm still confused because even though I have
this for the clamd.sock path

LocalSocket /var/lib/clamav/clamd.socket

And I've created the file as per the instructions you gave

chris at localhost:/var/lib/clamav$ ls -l *.socket
-rw-r--r-- 1 clamav clamav 0 Aug 21 17:05 clamd.socket

I even made sure the socket name and path were correct in the
/mail/spamassassin/clamav.pm 

# our $CLAMD_SOCK = 3310;               # for TCP-based usage
our $CLAMD_SOCK = "/var/lib/clamav/clamd.socket";

I started the daemon

chris at localhost:/var$ sudo systemctl start clamav-daemon.service

then checked the status

chris at localhost:/var$ systemctl status clamav-daemon.service
● clamav-daemon.service - Clam AntiVirus userspace daemon
   Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled;
vendor preset: enabled)
   Active: active (running) since Sun 2016-08-21 16:12:07 CDT; 10s ago
     Docs: man:clamd(8)
           man:clamd.conf(5)
           http://www.clamav.net/lang/en/doc/
 Main PID: 20625 (clamd)
   CGroup: /system.slice/clamav-daemon.service
           └─20625 /usr/sbin/clamd --foreground=true

Aug 21 16:12:07 localhost systemd[1]: Started Clam AntiVirus userspace
daemon.
Aug 21 16:12:08 localhost clamd[20625]: Received 1 file descriptor(s)
from systemd.
Aug 21 16:12:08 localhost clamd[20625]: clamd daemon 0.99 (OS: linux-
gnu, ARCH: x86_64, CPU: x86_64
Aug 21 16:12:08 localhost clamd[20625]: Running as user clamav (UID
121, GID 130)
Aug 21 16:12:08 localhost clamd[20625]: Log file size limited to
2097152bytes.
Aug 21 16:12:08 localhost clamd[20625]: Reading databases from
/var/lib/clamav
Aug 21 16:12:08 localhost clamd[20625]: Bytecode: Security mode set to
"TrustSigned".

So, after going through all of this multiple times, too many to count,
checking permissions on files and folders, comparing with my 14.04
backup I still get

X-spam-virus: Error (Cannot connect to unix socket
'/var/run/clamav/clamd.socket': connect: Permission denied)

There is a clamd.socket file in /var/run/clamav

chris at localhost:/var/run/clamav$ ls -l *.socket
-rw-r--r-- 1 clamav clamav 0 Aug 21 09:04 clamd.socket

And also in /run/clamav

chris at localhost:/run/clamav$ ls -l *.socket
-rw-r--r-- 1 clamav clamav 0 Aug 21 09:04 clamd.socket

Shouldn't a socket file have an 's' as the first character such as this

srw-rw-rw-  1 root   root     0 Aug 18 15:45 snapd.socket

So, and I may be repeating myself, why does the daemon keep looking for
the socket file in /var/run/clamav when I state in the clamd.conf file
that it is in /var/lib/clamav?

Apologies for the long message and hopefully I didn't repeat myself too
many times and hopefully I've explained everything that I'm confused
about.

Chris
-- 
Chris
KeyID 0xE372A7DA98E6705C
31.11972; -97.90167 (Elev. 1092 ft)
16:16:48 up 3 days, 31 min, 1 user, load average: 3.46, 2.15, 1.70
Ubuntu 16.04.1 LTS, kernel 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016





More information about the ubuntu-users mailing list