Skip to content

Commit

Permalink
Correct location of default clamd.sock file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
micahsnyder authored Feb 7, 2023
1 parent fdf806a commit dd5920e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit dd5920e

Please sign in to comment.