Issue with Clamav Socket on Centos 7

Support for security such as Firewalls and securing linux
Post Reply
azizgstest
Posts: 11
Joined: 2017/05/22 19:03:39

Issue with Clamav Socket on Centos 7

Post by azizgstest » 2018/07/20 10:40:09

Hi All,

I'm using Clamav with postfix, but it's not able to scan/block emails and fails with the below error message :
/var/run/clamd.amavisd/clamd.sock failed, attempt #1: Can't connect to a UNIX socket /var/run/clamd.amavisd/clamd.sock: Connection refused

Note : When I installed clamd, the socket file (clamd.sock) wasn't there so I created one and gave it the permissions required.

Any hint on how to resolve this issue ?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Issue with Clamav Socket on Centos 7

Post by TrevorH » 2018/07/20 11:48:23

Try restorecon -RFv /var/run/clamd.amavisd
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

azizgstest
Posts: 11
Joined: 2017/05/22 19:03:39

Re: Issue with Clamav Socket on Centos 7

Post by azizgstest » 2018/07/20 16:45:53

I tried that with same results.

Where does Clamav create the clamd.sock file by default ?

Note : I'm using the latest version for epel repos : clamav-0.100.2

C3nt0s
Posts: 3
Joined: 2015/10/12 08:34:03

Re: Issue with Clamav Socket on Centos 7

Post by C3nt0s » 2018/11/09 09:55:58

Did you solve the problem? I have the same issue, that i cannot connect to the socket...

Before the clamav update, everything worked fine...

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Issue with Clamav Socket on Centos 7

Post by TrevorH » 2018/11/09 10:19:53

The package 'clamd' supplies a tmpfiles.d entry (/usr/lib/tmpfiles.d/clamd.scan.conf) to create /run/clamd.scan so I would guess that is the correct directory for the socket file.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply