Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/start.sh: line 14: /data/turnserver.conf: Permission denied #14

Closed
Qwertie- opened this issue May 10, 2018 · 3 comments
Closed

/start.sh: line 14: /data/turnserver.conf: Permission denied #14

Qwertie- opened this issue May 10, 2018 · 3 comments

Comments

@Qwertie-
Copy link

When running the example command

# docker run -v /tmp/data:/data --rm -e SERVER_NAME=localhost -e REPORT_STATS=no avhost/docker-matrix:v0.28.1 generate

It outputs

-=> generate turn config
/start.sh: line 14: /data/turnserver.conf: Permission denied
/start.sh: line 15: /data/turnserver.conf: Permission denied
/start.sh: line 16: /data/turnserver.conf: Permission denied
/start.sh: line 17: /data/turnserver.conf: Permission denied
/start.sh: line 18: /data/turnserver.conf: Permission denied
/start.sh: line 19: /data/turnserver.conf: Permission denied
/start.sh: line 20: /data/turnserver.conf: Permission denied
/start.sh: line 21: /data/turnserver.conf: Permission denied
-=> generate synapse config
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/synapse/app/homeserver.py", line 511, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/synapse/app/homeserver.py", line 506, in main
    hs = setup(sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/synapse/app/homeserver.py", line 287, in setup
    config_options,
  File "/usr/local/lib/python2.7/dist-packages/synapse/config/_base.py", line 284, in load_or_generate_config
    with open(config_path, "wb") as config_file:
IOError: [Errno 13] Permission denied: '/data/homeserver.tmp'
-=> configure some settings in homeserver.yaml
awk: cannot open /data/homeserver.tmp (No such file or directory)
mv: cannot create regular file '/data/homeserver.tmp': Permission denied
mv: cannot stat '/data/homeserver.tmp': No such file or directory
-=> configure some settings in localhost.log.config
sed: can't read /data/localhost.log.config: No such file or directory

-=> you have to review the generated configuration file homeserver.yaml

OS is Fedora 28

@mvgorcum
Copy link

I can't reproduce this on ubuntu 18.04, but it looks like you don't have write permissions in the folder that you're going to place the config files in, in your case /tmp/data could that be it?

@andreaspeters
Copy link
Member

I can't repoduce too on arch linux:

  ~ mkdir /tmp/data
➜  ~ docker run -v /tmp/data:/data --rm -e SERVER_NAME=localhost -e REPORT_STATS=no avhost/docker-matrix:v0.28.1 generate
Unable to find image 'avhost/docker-matrix:v0.28.1' locally
v0.28.1: Pulling from avhost/docker-matrix
f2aa67a397c4: Pull complete 
60f108f4f72a: Pull complete 
e1a2b73ff041: Pull complete 
7fb4a4fb61f9: Pull complete 
6e01b07a97a7: Pull complete 
0fa1c06d8c27: Pull complete 
Digest: sha256:eea7cb97a4589dc202fa842e2999dd22d237eb9f6e19c53e2b6a054df6ad3229
Status: Downloaded newer image for avhost/docker-matrix:v0.28.1
-=> generate turn config
-=> generate synapse config
A config file has been generated in '/data/homeserver.tmp' for server name 'localhost' with corresponding SSL keys and self-signed certificates. Please review this file and customise it to your needs.
If this server name is incorrect, you will need to regenerate the SSL certificates
-=> configure some settings in homeserver.yaml
-=> configure some settings in localhost.log.config

-=> you have to review the generated configuration file homeserver.yaml

@Qwertie-
Copy link
Author

Qwertie- commented May 10, 2018

Turns out adding :z to the end of the fs mount part fixed it. Think it has to do with SELinux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants