Hi,
I am syncing two folders (‘documents’ and ‘music’) between a Linux Mint machine (Syncthing 1.12.0) and TrueNAS Core 12.0-U2.1 (Syncthing 1.13.1). These two folders are synced to different ZFS pools on the NAS - the documents folder is kept private and the music folder is shared with others. On the NAS, syncthing runs in a jail as user ‘syncthing’ with ID 983. I have tried to replicate the relevant user and group IDs from the TrueNAS system inside the syncthing jail.
The ‘documents’ syncing works fine (in the jail, the ‘syncthing’ user with ID 983 is a member of the group ‘daniel’):
SOURCE (laptop) drauch:drauch (IDs 1000:1000)
DEST (TrueNAS system) daniel:daniel (IDs 1001:1001)
DEST (in the jail) daniel:daniel (IDs 1001:1001)
The ‘music’ folder setup is similar (again, in the jail, the ‘syncthing’ user with ID 983 is a member of the group ‘allusers’):
SOURCE (laptop) drauch:drauch (IDs 1000:1000)
DEST (TrueNAS system) root:allusers (IDs 0:1000)
DEST (in the jail) root:allusers (IDs 0:1000)
When I create an empty file in the music folder on the laptop, it gets synced to the NAS alright. However, when I delete it on the laptop, it is not deleted on the NAS and I get an ‘out of sync item’ with the ‘permission denied’ hint. When I modify the content of an existing file on the laptop, syncing fails as well. And corresponingly, when I rename ‘file1’ to ‘file2’ on the laptop, ‘file2’ is created alright on the NAS, but ‘file1’ is not deleted.
All of this only happens for the ‘music’ folder - the ‘documents’ folder works perfectly fine.
As an alternative, I have also changed the file and directory ownership to 983 for the music folder on the NAS, but this didn’t change the behaviour. The motivation for this was that I noted that syncthing on the NAS creates synced files with 983:allusers ownership.
Any ideas or hints are greatly appreciated! Many thanks!
Bonus question: Ideally, I would like to make Syncthing create files with ownership root:allusers in the music folder. Is this possible?