I’m running ST on a pair of QNAP NAS boxes. These are the Entware ports. The recieving box always writes the file as user “syncthing” overriding whatever user it previously was. Is there a way to choose or set what user the file is written as? I have ignore permissions checked and sync permissions unchecked at both ends.
Have you read the documentation about ownership synchronization?
Yes I have. As I mentioned, I have ignore permissions checked and sync permissions unchecked at each end. In order to not ignore permissions or sync permissions, ST must be run with elevated privileges. That is not possible on Qnap. ST runs as a normal user which is syncthing. I’ve not found a way to change this behaviour which is the essence of my question.
When not syncing ownership (which indeed requires elevated privileges), Syncthing can only create files as the user it runs under. So, it becomes a question of running Syncthing as the user you want to own the files. I don’t know to what extent that’s possible or even makes sense on a QNAP.
That is indeed the essence of the question. The question then becomes what does “elevated privileges” actually mean? I assume it means root user but I’m not really sure. If that is what is required then I think I’m stuck since it’s not possible on Qnap to set what user ST runs at. The syncthing user must be set somewhere but I’ve not found out where. If I could solve that, I might have a chance.
I don’t really know the QNAP environment, but on a Synology NAS, I’d try solving this by setting appropriate ACLs to allow other users access to the files owned (and created) by syncthing. If you check the “ignore permissions” setting, then the synced files should inherit ACLs from the parent folder. Then you don’t need to worry about the files’ owner.
If the goal is explicitly to sync the ownership (assuming matching user names or UIDs exist on all involved devices), then yes, your only way is to get Syncthing running with elevated privileges. The documentation shows you how to set them, but I agree it will probably not be so easy on a managed QNAP operating system with package updates replacing the binary, etc.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.