I've already checked many threads regarding the topic and tried different flags combinations, but couldn't solve the problem.
Scenario: I'm working under user A and have source files owned by A, target files are owned by user B, I copy source to destination using rsync under sudo and want target files to stay owned by B after copying.
sudo rsync -ar src/ dst/
sudo rsync -ar --no-o src/ dst/
B:A (if files contents is same) or
root:A (if files contents is different)
How can I keep
B:B on target files?
For example, simple
sudo cp -r src/ dst/ can do this.