Sync to existing folder

I installed the docker version on my raspberry.

I sync laptop - raspi. Default the folders were syncronized to a subfolder of ~ which is e.g. /home/gekr/ei23-docker/volumes/syncthing/lenovo/

Now I want to do an additional sync in an existing folder:

/home/gekr/ei23-docker/volumes/ei23/docs/docs

I found out, that syncthing uses the user www-data. So I changed the tree down form /home to existing/previous owner and the group www-data. The destination folder, of course, also with write access for www-data.

But I always get the permmission error:

 2024-10-27 18:04:03: Failed to create folder root directory mkdir /home/gekr: permission denied

2024-10-27 18:04:03: Error on folder "mySHS - Dokumentation" (hqqfb-mwgwp): folder path missing 

So, whats wrong and what do I have to do? And why wnat syncthing create a folder home/gekr?? All folders in path exists.

Many thanks for any help to a Linux beginner.

Generally, with Docker, this is because you haven’t mapped the path into the container correctly. You don’t describe any details on this part of the setup.

I assume you mean the syncthing config? Here it is:

  syncthing:
    image: syncthing/syncthing
    container_name: syncthing
    hostname: syncthing-server
    environment:
      - PUID=33
      - PGID=33
    volumes:
      - ./volumes/syncthing:/var/syncthing
    ports:
      - 8384:8384 # Web UI
      - 22000:22000/tcp # TCP file transfers
      - 22000:22000/udp # QUIC file transfers
      - 21027:21027/udp # Receive local discovery broadcasts
    restart: unless-stopped    

The destination folder is not a container (and also I tried to sync it to: /home/gekr. This also doesn’t work

Some /home/gekr in the container is not mapped to the outside. You want something like

...
    volumes:
      - ./volumes/syncthing:/var/syncthing
      - /home/gekr:/home/gekr

for it to be accessible in the container.

Many thanks. Basically it works now. But I have 2 persistent errors:

I set this folder to 0777, but it doesn’t help. Is any other thing to do to delete this error? Sync works fine also in/with this folders.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.