Commit 440826ae authored by Andrej Shadura's avatar Andrej Shadura

Make sure the key file is owned by the user running synapse

Closes: #923573
parent c8be136c
......@@ -53,10 +53,14 @@ do_start()
{
# Fail silently if CONFIGFILE_SERVERNAME doesn't exist
[ -f $CONFIGFILE_SERVERNAME ] || return 0
KEYFILE=$(get_config_key signing_key_path)
# Running --generate-config to create keys if any are absent.
# Doesn't matter if not
$PYTHON -m "synapse.app.homeserver" $CONFIGS --generate-keys || return 2
# Make sure the key file is owned by the user running synapse
chown $USER:nogroup $KEYFILE
chmod 0600 $KEYFILE
# Return
# 0 if daemon has been started
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment