-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
docker ... generate results in permission denied #6303
Comments
well, it works ok here. Are you starting with a non-empty volume? |
I am starting with an empty volume and pulling the latest image from dockerhub:
Now the volume exists but still is owned by root. Manually fixing ownership:
And then rerunning works:
Docker version, in case that is relevant:
I think the issue is in
It's first execve'ing synapse under user id 991 to write the config to /data. The chown is expected to be executed afterwards as can be seen above, however this is never reached, so /data is never going to be owned by 991. |
I ran into this same issue yesterday and was finally able to resolve it and get synapse up and running by using the |
I seem to have the same issues when trying to generate on CentOS 7
|
my apologies, it seems I was testing with an old copy of the image; this was introduced in synapse 1.4.0 (presumably by #5970) |
So it does indeed strike me as odd that one part of the PR would execute those actions in one order: And the next (which breaks) is executed in the reverse order: Before the PR things indeed ran in 1. check data dir perms 2. execute on them order: I've tested the patch locally and it works for me. I've created a PR for this here: #6389 |
The patch has been merged in #6389, thank you for providing it. Let us know if you experience any further problems by creating a new issue. |
seems this issue is still not fixed? I've pulled latest image today, but i can't get "generate" - command running... permission denied for homeserver.yaml |
@makakken Could you post the full command you are running, plus all the output it produces? |
i've tryed via docker-compose
output:
|
@makakken Could you file a new issue with the above information? Thanks. |
im sorry if this is off topic but this saved my butt after an emergency migration of my main synapse process to a new local machine particularly the use of chown from inside the synapse container |
Is there a solution to this? I'm facing the same issue |
I implemented the following ansible task to setup matrix: https://github.com/kevinveenbirkenbach/cymais/blob/master/roles/docker-matrix/tasks/main.yml This is the context of the role: |
Description
Cannot generate initial configuration by running
docker run -it --rm --mount type=volume,src=synapse-data,dst=/data -e SYNAPSE_SERVER_NAME=myserver.invalid -e SYNAPSE_REPORT_STATS=no matrixdotorg/synapse:latest generate
Steps to reproduce
docker run -it --rm --mount type=volume,src=synapse-data,dst=/data -e SYNAPSE_SERVER_NAME=myserver.invalid -e SYNAPSE_REPORT_STATS=no matrixdotorg/synapse:latest generate
Expectation was a config file is generated.
I believe the following patch might fix this (untested):
ma-fl@70ed663#diff-d3b843a551028930ec04a76a93e6efcb
As a quick workaround I just adjusted the ownership of /data in the volume and retried.
The text was updated successfully, but these errors were encountered: