Syncing specific files within system folders on a Mac - help

Got a question about a particular use case I’m trying to implement

  • I’m running syncthing via the syncthing-macosx wrapper on 2 Macs
  • I’m trying to sync some specific files that reside in /Library/Preferences, which is a system folder
  • I’ve got ignore patterns set up to specifically include just the files I need synced, and to ignore everything else
  • Computer A has the “master” version of these files I want synced one-way to Computer B, so syncthing on Computer A has this folder set up as “Send Only”.

The issue is that because the files reside in a system folder, syncthing can’t actually do any syncing due to a lack of permissions to write to that folder.

So what’s my best solution here?

You could run syncthing as root, but this is very dangerous and we highly recommend you don’t do that. I am not very proficient in OS X, but perhaps you could change ownership of those files to someone that is not root.

The specific files I’m trying to sync are not owned by root.

Definitely keen not to run syncthing as root.

Well then syncthing has to run as the user who owns the files. There might be ACL’s which is an alternative form of permissions that you might have to tweak, if the files are already owned by the same user.

Thanks very much - I’ll have a look at ACLs and file ownership on both machines to try and figure it out that way.

Got another Mac system file syncing question so I thought I’d add to this thread rather than start another one.

Trying to sync the hosts file (/etc/hosts) between 2 computers, but I can’t get it to work. That file has its ownership set to the same user that Syncthing is running as (on both computers), I’ve set up Ignore patterns to make sure that that is the only file in /etc that is syncing, but changing the file on 1 computer means it goes Out Of Sync on the other, and the issue given is the lack of permissions.

The ownership has to be set on the receiving side, also, given its a magic file that could he abused by viruses, I would not be surprised if ownership is not enough.

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