The issue seems to be easy to resolve, but I can't get what is the trick.
I launch it as:
Code: Select all
/usr/bin/rsync -avhRz --delete --delete-excluded --exclude-from="/some/path/to/exclude/list" --rsync-path="sudo rsync" -e "ssh -i /home/myuser/.ssh/mykey" myuser@myipaddress:/some/path/at/source /some/path/at/destination 2>&1 | tee -a /some/path/to/logOther details:
- both machines run Gentoo
- both machines have user "root", user "myuser", and many other users coincide
- the destination folder resides on a partition EXT4, mounted just with parameters rw,relatime - nothing mask
- the source machine has an entry in visudo myuser myhostname=(root) NOPASSWD: /usr/bin/rsync
And ALL the files and folders at the destination have permissions myuser:myuser, including those that are of root.
If I remove "2>&1", no error appears.
Why is it so?



