How can I run an rsync backup/replication script in a user other than root while preserving permissions? This is a multi-user fileserver, where each user has a *nix account for permissions.
Running with the root user poses obvious security risk – especially when you are using passwordless ssh keys to do it automatically.
But running in a user other than root (like a backup user with full group permissions to the data directories), has problems setting permissions because only the owner or root can change permissions.
In a perfect world, the production server user would only have read-only access.
Thanks!
Best Answer
You can use fakeroot -s: