Skip to content

Commit

Permalink
Docker: Change permissions for data dir before attempting to write to…
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 authored Nov 20, 2019
1 parent 4f5ca45 commit 234f55f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/6389.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix permission denied error when trying to generate a config file with the docker image.
6 changes: 3 additions & 3 deletions docker/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 234f55f

Please sign in to comment.