0

Clamav is running as clamscan user

But I get a permisson denied error:

Apr  6 20:23:48 nais2 clamsmtpd: 100003: CLAMAV: couldn't connect to: /var/run/clamd.scan/clamd.sock: Permission denied

But:

ls -lah /var/run/clamd.scan/clamd.sock
drwx--x---. 3 clamscan clamscan 60 Apr  6 20:28 ..

and clamscan has permission to the directory.

4

/var/run/clamd.scan/clamd.sock should be a socket file, not a directory. clamscan will create the socket file when it starts.

Where your filemask looks like drwx--x---, it should be srwx--x---.

Remove that directory, and restart your service, to let clamd create the socket file.

  • after removing and restarting now the error is CLAMAV: couldn't connect to: /var/run/clamd.scan/clamd.sock: No such file or directory – Naishu Babu Apr 7 '18 at 2:46
  • Configure clamd to actually create the listening socket. A socket is a temporary object (to communicate etc.) that has to be created by a process. – A.B Apr 7 '18 at 15:56
  • ClamAddress: /var/run/clamd.scan/clamd.sock i have given this in the .conf file – Naishu Babu Apr 8 '18 at 22:16
  • @naishu - I'm not sure what .conf file you put ClamAddress in. In clamd.conf, you should likely have the line LocalSocket /var/run/clamd.scan/clamd.sock – Randall May 23 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.