From dd5920eae0779d519e2252b793d732d521177d7a Mon Sep 17 00:00:00 2001 From: Micah Snyder Date: Mon, 6 Feb 2023 17:33:55 -0800 Subject: [PATCH] Correct location of default clamd.sock file The change to use /tmp/clamd.sock instead of /var/run/clamd.sock was an intentional step towards being able to build an unprivileged/rootless image as requested by Cisco-Talos/clamav#478 It looks like we forgot to update the documentation to note the change in the clamd.sock location. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cff588d..37047d0 100644 --- a/README.md +++ b/README.md @@ -345,7 +345,7 @@ docker exec --interactive --tty "clamav_container_01" /bin/sh ### Unix sockets The default socket for `clamd` is located inside the container as -`/run/clamav/clamd.sock` and can be connected to when exposed via a Docker +`/tmp/clamd.sock` and can be connected to when exposed via a Docker volume mount. To ensure, that `clamd` within the container can freely create and remove the socket, the path for the socket is to be volume-mounted, to expose it for others on the same host to use. The following volume can be used @@ -357,6 +357,9 @@ open clamd for anyone on the host system. --mount type=bind,source=/var/lib/docker/data/clamav/sockets/,target=/run/clamav/ ``` +> _Note_: If you override the `LocalSocket` option with a custom `clamd.conf` +config file, then you may find the `clamd.sock` file in a different location. + With the socket exposed to the host, any other service can now talk to `clamd` as well. If for example `clamdtop` where installed on the local host, calling ```bash