I want to use rsync to upload a local web application on my OS X machine to a linux server.
I use this command :
sudo rsync -Harov --delete -e "ssh -p 33224" "/Users/me/myapp/" "[email protected]:/home/linuxuser/test-rsync-app"
The problem is that my local application has some folders that belongs to _www (on Mac OS X), and when uploaded, they all belong to linuxuser, so I lose the ownership of the apache user for those folders.
Ideally, I would use rsync and the files that belongs to _www on my Mac would belong to www-data on the linux server.
Is there a way to do this ?
If you don't have root privileges on the Linux server then no, you cannot make the user (and group) be www-data.
If you do have root privileges, this question should be helpful to you:
rsync over SSH preserve ownership only for www-data owned files