I seem to come up against this issue occasionally:
owned by user: apache
(no 'ftp' user present)
owned by user: ftp
(apache user present, but not used)
I connect to serverA as root, then rsync over ssh to serverB as root. After which, all the assets on serverB are owned by either root or apache, depending on whether or not I tell rsync to preserve the ownership that the files have on serverA.
Anyone have any tricks for changing ownership of rsync'ed files on serverB to an alternate user, one that is not the owner on serverA and is not the user issuing the rsync command? The resulting files on serverB would be owned by the 'ftp' user.
In the past, I've always just followed the command with a recursive chown, but I'd like to find a way to do this in rsync, or get it down to a single command.