[clamav-users] Error (Cannot connect to unix socket '/var/lib/clamav/clamd.socket': connect: No such file or directory)

Reindl Harald h.reindl at thelounge.net
Sun Aug 7 13:17:35 EDT 2016



Am 07.08.2016 um 19:13 schrieb Chris:
> On Sun, 2016-08-07 at 17:02 +0200, Tobi wrote:
>> Hi Chris
>>
>> sorry I was not clear enough. I did not mean to start the service via
>> systemd but to call like
>>
>> sudo /usr/sbin/clamd -c /path/to/config
>>
>> and see then if the socket has been created in expected location.
>>
>> Cheers
>>
> Thanks Tobi, however that didn't work either:
>
> chris at localhost:~$ sudo /usr/sbin/clamd -c /etc/clamav/clamd.conf
> [sudo] password for chris:
> ERROR: LOCAL: Socket file /run/clamd.socket could not be bound:
> Permission denied
> Closing the main socket.
> ERROR: Can't unlink the socket file /run/clamd.socket

*frankly* you need a subfolder *below* /run because when the socket is 
created *after* drop privileges the daemon has no business to write 
cirectly below /run

* create a subfolder
* make sure it has the correct permissions
* enuse it's created at boot with systemd-tmpfiles

there is a reason i posted you this already:
[root at mail-gw:~]$ cat /etc/tmpfiles.d/clamd.conf
d /run/clamd 0775 clamscan clamilt

that's for re-create folders at boot since /run is tmpfs


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clamav.net/pipermail/clamav-users/attachments/20160807/27f17418/attachment.sig>


More information about the clamav-users mailing list