element-hq / element-hq/synapse

Run chown on startup, not when generating config

Open
#19,166 2 comments 0 reactions 0 assignees View on GitHub
X-Needs-Info
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

Synapse needs its data folder owned by the correct user to function.
Currently, this is achieved by running `chown` when generating the `homeserver.yaml` file only.

The issue with this is, it does not work for deployments where the container generating that config file is not the actual container running synapse later on. For example in my case I generated the config file on my local machine, then uploaded everything to a server and deployed synapse on there. And because chown never happened on that server, synapse was unable to write to the data directory.

Therefore I think it would be best to run chown on startup of the actual synapse service, NOT when generating the config file;
Either only on first startup (if that can already be detected), or with a flag to disable it; since running chown on very large directories can add quite some time to the service startup.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.