funkyfuture/docker-rpi-syncthing

Create folder errors

ramontayag opened this issue · 4 comments

Do you see errors like Creating folder: mkdir /home/syncthing: permission denied?

Not sure why it complains about that... everything looks like it should make /syncthing the home directory.

raspberrypi___syncthing

some information about your container setup would be useful.

this could be caused by the fact that i changed the syncthing process to run as another user, see 429016b. unfortunately i didn't came up with an idea how to announce this. anyway, if this is the case, a one-time adjustment of ownership should solve it. or - not recommended - you set UID and GID to 0.

@funkyfuture it's a completely new docker container, and I'm mounting some test folders. I'm using ansible to start it, but it looks almost identical to docker compose:

---
- name: Run syncthing container
  docker_container:
    name: syncthing
    image: funkyfuture/rpi-syncthing:0.14.23
    ports:
      - "8384:8384"
    volumes:
      - /home/pi/syncthing-test/data:/syncthing/data
      - /home/pi/syncthing/config:/syncthing/config
    restart: yes
    restart_policy: always
    network_mode: host
    env:
      GUI_ADDRESS: "[::]:8384"

I fail to realize why it's trying to create folders in /home/syncthing, when it should be doing so in /syncthing.

Ok, to simplify it, just running docker run --rm --network=host funkyfuture/rpi-syncthing will give me similar errors:

raspberrypi___syncthing

Do you mean to say that at the beginning, I have to attach to the running container and make changes to the ownership?

Ok, it seems that this is issue is just a red herring. The default folder of syncthing is /home/syncthing but that does not exist in the container. People can just delete that default folder and choose the data directory to store data.