[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:41:31 EDT 2016



Am 07.08.2016 um 19:33 schrieb Chris:
> On Sun, 2016-08-07 at 19:17 +0200, Reindl Harald wrote:
>>
>> 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
>>
> If there's nothing in that folder do I make a file? Apologies if dumb
> question but I'm banging my head and previous upgrades didn't give me
> problems like this at all. They just worked with my setup as it was

nothing in which folder?

the whole point is that you need a folder below /run/ where your clamd 
stuff lives and that this folder needs to be writeable by the user clamd 
is supposed to drop it's privileges to

the folder and user depends on the packages of your distribution and 
"create a subfolder" is just to prevent a needed reboot since tmpfiles 
is only supposed to run at boot time

no idea how to explain systemd basics here, but your problems are not 
really clamav specific, it looks like you don't understand the current 
operating system version and it's tools at the moment and i fear here is 
not the place to put the pieces together

"I'm banging my head and previous upgrades didn't give me problems like 
this at all" for me sounds the upgrade path of your distribution or the 
package of your distribution is just broken and so create a bugreport 
there while in the meantime downgrade (if you can't downgrade your 
operating system management needs some re-thinking)

-------------- 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/55daf0d4/attachment.sig>


More information about the clamav-users mailing list