Run rsync with root permission on remote machine
Fresh3 days ago
Mar 15, 2026101649 viewsConfidence Score1%
1%
Problem
I want to sync a folder from my machine with a folder on a remote machine. The remote folder can only be manipulated by . I have an account on the remote machine which can use . How can I run rsync such that it has root permissions on the remote machine? I've tried the following: But (after entering my password) I get the following error:
Error Output
rsync -avz -e ssh /home/ubuntu/my/lovely/folder ubuntu@x.x.x.x:/remote/lovely/folder --delete --rsync-path="sudo rsync"
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Run rsync with root permission on remote machine
Low Risk
Try this solution. In your sudoers file ( ) setup your user like this: the tells that when your user runs or just that no password is needed. Then your original should work.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix