I usually use a graphical SSH client to sync a local and remote directory. And I have to set the ownership of all the files from
Can I do the same with Rsync, only that I do it as
www-data instead of
root, so that I dont have to set the ownership afterwards?