Syncthing doesn't have permission to create folder

I’m trying to run anything in a docker container on a vm and I’m getting the fallow error:

Failed to create folder marker: mkdir /var/syncthing/Sync/.stfolder: permission denied

My docker-compose is :

version: "3.9"

services:

    syncthing:
        image: syncthing/syncthing
        container_name: syncthing
        hostname: syncthing
        environment:
            - PUID=1000
            - PGID=1000
        volumes:
            - ./syncthingFolder:/var/syncthing/
        expose:
            - 8384
        ports:
            - 22000:22000/tcp # TCP file transfers
            - 22000:22000/udp # QUIC file transfers
            - 21027:21027/udp # Receive local discovery broadcasts
        restart: unless-stopped
        networks:
            - default

The folder perms are:

toor has puid 1000

Could someone help me to solve this issue?

From the screenshot, ~/WW4.0/syncthingFolder is owned by user:group toor:toor, but ~/WW4.0/syncthingFolder/Sync is owned by root:root.

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