Skip to content
Snippets Groups Projects
Unverified Commit 234f55f3 authored by Andrew Morgan's avatar Andrew Morgan Committed by GitHub
Browse files

Docker: Change permissions for data dir before attempting to write to it (#6389)

parent 4f5ca455
No related branches found
No related tags found
No related merge requests found
Fix permission denied error when trying to generate a config file with the docker image.
\ No newline at end of file
...@@ -169,11 +169,11 @@ def run_generate_config(environ, ownership): ...@@ -169,11 +169,11 @@ def run_generate_config(environ, ownership):
# log("running %s" % (args, )) # log("running %s" % (args, ))
if ownership is not None: 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. # make sure that synapse has perms to write to the data dir.
subprocess.check_output(["chown", ownership, data_dir]) subprocess.check_output(["chown", ownership, data_dir])
args = ["su-exec", ownership] + args
os.execv("/sbin/su-exec", args)
else: else:
os.execv("/usr/local/bin/python", args) os.execv("/usr/local/bin/python", args)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment