0

Answer posted by me below, can't accept my own answer yet

I am working on a chat client, for development I use a docker setup that uses a 'generate' command to create a config file that you can adjust and use to launch the actual service. On my desktop it works fine however when trying to run it on a respberry or a seperate hd on my laptop it throws a file handler error in the build process stating that permission has been denied.

I might be a total noob here but I did change folder mount point permission on my laptop and the raspberry has permissions set on the folder.

Docker also is set up to run w/o typing sudo for every command.

Here are the permission codes for working vs non working config file

# Auto generated, working local
-rwxrwxrwx 1 root root 103443 <date> <filename>
# Auto generated not working pi and laptop
-rw-r--r-- 1 991 991 106030 <date> <filename>

Am I just not correctly setting up my hard drives ? I get this error on my pi if it's on the default OS partition or not. I am able to start up and serve django with reverse proxy no issue.

The chat service I am building on is matrix/synapse. Here is the docker folder on the synapse server repo with the basic setup. The file giving issues is homeserver.yml that is generated from:

docker-compose run --rm synapse generate
0

Actually not a linux permission shenanigan at the root

This might have been a side effect from the most recent synapse docker repo push since this was happening across multiple devices for me. I solved it by specifying a part of the manual setup for docker myself. The solution might prove useful for other config related issues.

Solved it, exact solution could be applied in a better way probably

Scenario:

Generate a config for synapse server that will be used to create a docker container for synapse. Goal is to use for dev of a matrix client.

Issue:

After successful creation of config ('homeserver.yaml'), the build of synapse using that config would throw a Permission error with a python stacktrace indicating not being able to read the file (inside container), result service exit 1 and no docker logs service.

Solution:

some of these settings can be set using env variables see synapse readme After checking matrix/synapse docker repo I noticed a recent and frequent update history. Either my system messed it up or there is an issue in the recent config setup for the container. So I did some of the normally automated stuff myself.

  • created the folders that synapse uses with the conf ('homeserver.yml') If using bind mount (as on the repo page) the docker volume will be in /var/lib/docker/volumes/<name of bind mount>/_data In here you want to create media_store, uploads, logs.

  • Look for the created folder names in 'homeserver.yml' and make sure the paths point to those.

  • Assigned the default group and right following the synapse repo guidelines.

    # UID & GID default to 991
    chown 991:991 media_store/ uploads/ logs/
    
    
  • Point your log setting handler to the logs folder, the log file does not exist at the time of setting this config. The log handler file can be found in .log.config

    handlers:
     file:
         filename: /data/logs/homeserver.log
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.