How can I change the user permissions so that the user will be able to rsync between two systems as a root.
I added the user in visudo.
paru ALL = NOPASSWD: /usr/bin/rsync
then I typed the rsync command in 1 system to push data from one server to another
rsync -avP /opt/paru/ firstname.lastname@example.org:/opt/paru
when I rsync, it gives me the following error:
sending incremental file list rsync: mkdir "/opt/paru" failed: Permission denied (13) rsync error: error in file IO (code 11) at main.c(576) [receiver=3.0.6] rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
What should I do so that user paru can rsync between the two systems as a root?