Assume two sites A and B with file server at either end. The contents of /storage
should be synchronized between the sites, preserving ownership and permissions. There's no all encompassing group that group-owns all of the files in /storage
. If running Unison or rsync pid=0 it is trivial to do the synchronization. However SSH is to be used as transport and for obvious reasons SSH root login has been disabled on both ends.
How can I keep A and B synchronized with all permissions preserved in that situation. Two methods I can think of:
- Running a secondary SSH that permits root logins yet may only connect over a VPN between A and B.
- adding a special synchronization user which sshd configuration forcibly executes a
- SUID wrapper to Unison or rsync (dangerous to get right).
sudo
wrapper to Unison or rsync
The answers given to the Question Remotely use root over ssh for unison suggest enabling password-less pubkey root login over SSH – I'm not very keen of that solution.
Any other ideas?