user1 wants to do a bi-directional sync between 2 machines. user1 is a member of group2 and has a non-privileged ssh tunnel. There are lots of files and dirs such as:
rwxrwx--- userN group2 enclair/WEB/CLIENTS/VictorMarty
A few files get edited on both machines and need manual merging. Therefore I went with Unison rather than a rsync job on both sides.
unison's preference file:
perms = -1 #group = true #owner = true times = true
Bi-directional sync command I use:
$ unison "profile" -perms 0 -dontchmod
... UNISON 2.48.3 finished propagating changes at 02:29:24.90 on 13 Sep 2015 Saving synchronizer state Synchronization incomplete at 02:29:25 (0 items transferred, 1 skipped, 60 failed) failed: enclair/WEB/CLIENTS/VictorMarty
I can get it work by commenting out
times in the profile.prf file. Loosing the mtime metadata in the process.
I see one can sudo unison and sudo with the
--server-cmd on the other side, so that in effect unison gets executed as root, but the connection is still as normal user.
Is this the way to achieve bi-directional sync keeping the files modified time, preferably keeping user1?