Apologies if this is covered elsewhere, I couldn’t find anything searching (save a thread from 2014), but I may not have searched for the correct terms.
I am using Syncthing in perhaps a slightly unusual arrangement. My aim was sync between desktop and laptop but it is rare that both are switched on at the same time, so I an running Syncthing on a Pi using Docker and have a three-way share. The Pi is always on and so files successfully sync between all three devices.
In the docker-compose.yml
file I set the PUID/PGID as 1000/100 (pi:users)
The sync folder is:
drwxrwsr-x user1:users /home/user1/sync
(mapped appropriately into the container)
When files are created there by Syncthing they are created as owned by pi:users
This is, I suppose, to be expected as that is the user that docker is running Syncthing as.
Ideally I’d like these files to be owned by user1:users
instead. In config.xml
I see there is a setting for copyOwnershipFromParent
but I can’t find a way to set this in the web interface. I tied stopping the container, changing the setting directly in the xml file and restarting the container, but nothing changes and when I look at the config.xml
file again it has been changed back.
I don’t want to run the container as user1
as there is also user2
(configured exactly as above) and that would mean running two separate containers.
Is there a way of setting Syncthing to use specific ownership when saving files?
If not is it possible for the files it saves to be saved as group writable?
Thank you.