matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.12k forks source link

Suggest /run for storing UNIX sockets #16698

Closed villepeh closed 11 months ago

villepeh commented 11 months ago

Description:

Modern distros (released within the last 10 years) have runtime directory set to /run rather than /var/run. The configuration manual examples suggest using /var/run/ which is a symlink for compatibility reasons.

Filesystem Hierarchy Standard

Modern Linux distributions include a /run directory as a temporary filesystem (tmpfs), which stores volatile runtime data, following the FHS version 3.0. According to the FHS version 2.3, such data were stored in /var/run, but this was a problem in some cases because this directory is not always available at early boot.

Would it be a good idea to change the example configs in the configuration manual? For example /var/run/synapse/main_replication.sock -> /run/synapse/main_replication.sock. Or am I splitting hairs? :)

I can create a PR if that's OK.

DMRobertson commented 11 months ago

https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s15.html broadly concurs, though it does note that:

In general, programs may continue to use /var/run to fulfill the requirements set out for /run for the purposes of backwards compatibility.

I don't think we have any strong opinions and would accept a docs PR.