mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
Docker: Change permissions for data dir before attempting to write to it (#6389)
This commit is contained in:
parent
4f5ca455bf
commit
234f55f3c4
2 changed files with 4 additions and 3 deletions
1
changelog.d/6389.bugfix
Normal file
1
changelog.d/6389.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix permission denied error when trying to generate a config file with the docker image.
|
|
@ -169,11 +169,11 @@ def run_generate_config(environ, ownership):
|
|||
# log("running %s" % (args, ))
|
||||
|
||||
if ownership is not None:
|
||||
args = ["su-exec", ownership] + args
|
||||
os.execv("/sbin/su-exec", args)
|
||||
|
||||
# make sure that synapse has perms to write to the data dir.
|
||||
subprocess.check_output(["chown", ownership, data_dir])
|
||||
|
||||
args = ["su-exec", ownership] + args
|
||||
os.execv("/sbin/su-exec", args)
|
||||
else:
|
||||
os.execv("/usr/local/bin/python", args)
|
||||
|
||||
|
|
Loading…
Reference in a new issue