Error with sharing folders via Docker

I have started syncthing in a docker container with:

docker run
–name syncthing
–network bridge
–hostname syncthing
-p 192.168.139.235:8384:8384
-p 192.168.139.235:22000:22000/tcp
-p 192.168.139.235:22000:22000/udp
-p 192.168.139.235:21027:21027/udp
-v /opt/docker/syncthing/config:/config
-v /opt/docker/syncthing/data:/data
-v /home/will/update-scripts:/data/home-will-update-scripts
-e TZ=Europe/Amsterdam
-e PUID=1000
-e PGID=1000
-d
–restart unless-stopped
linuxserver/syncthing

I then tried sharing the mounted folder for send-only. And receive an error:

Failed to create folder marker: mkdir /data/home-will-update-scripts/.stfolder: permission denied

The output of “docker exec syncthing ls -l /data” is:

total 8
drwxr-xr-x 2 abc users 4096 Aug 28 21:53 home-will-update-scripts

The output of “docker exec syncthing cat /etc/passwd” abc:x:1000:1000::/config:/bin/false

What am I missing here?

Is /home/will/update-scripts also owned by uid 1000? Otherwise adjust accordingly.

Yes - it is - below the output of “cat /etc/passwd” on the host:

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
_apt:x:42:65534::/nonexistent:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-network:x:998:998:systemd Network Management:/:/usr/sbin/nologin
systemd-timesync:x:997:997:systemd Time Synchronization:/:/usr/sbin/nologin
messagebus:x:100:107::/nonexistent:/usr/sbin/nologin
sshd:x:101:65534::/run/sshd:/usr/sbin/nologin
will:x:1000:1000:Will,,,:/home/will:/bin/bash
Debian-snmp:x:102:109::/var/lib/snmp:/bin/false
_chrony:x:103:110:Chrony daemon,,,:/var/lib/chrony:/usr/sbin/nologin

A little bit of context on what I’m trying to accomplish.

A system called logos is considered “syncthing-backup-server”. Within the container, there is a data folder at \data. Which points to /mnt/allData/syncthing on the host.

The idea is to have several shares within \data - one for each client. Each share is receive-only.

=====

On the client - in this example a system called morpheus - there is also a /data-folder within the container. The idea is to have a subfolder for each host-folder that requires syncing to logos. So the host-folder /home/will/update-scripts is mounted as /data/home-will-update-scripts. And shared with send-only.

=====

The expected end-result is that the morpheus-host-content of /home/will/update-scripts is available in the morpheus-syncthing-container as /data/home-will-update-scripts. And send to logos.

Where logos will store this in the container folder /data/morpheus/home-will-update-scripts. Which then ends on the host in the folder /mnt/allData/syncthing/morpheus/home-will-update-scripts.

=====

Does this make any sense?

Any suggestions to make this happen?