rsync and ssh keys help

Not specifically a mac question, but it's what I am using.

I am setting up some replication for some file shares using rsync. The problem is that I am being given a little bit of a twist - I'm supposed to use a non-admin account to do it with.

I have 2 boxes - Master and Slave with 1 account (sharesync). I setup a pub/private key pair and am able to successfully ssh from slave to master. I can also run rsync from the slave to the master. My problem is that rsync fails, complaining that it can't change ownership/permissions on the files that it just placed on the slave. This makes sense in that it requires admin rights to be able to chown files.

Is there a way to allow the non-admin sharesync account to rsync files? Or do I just tell the guy that we will do it the old fashioned way - using a root/admin account?

This works, by running it out of an admin account, but does not work with the sharesync key pair:

sudo -u sharesync /usr/bin/rsync -ahvv --delete --log-file=/Users/Shared/$(date +%Y%m%d)rsynclog_nosudo.txt sharesync@mastershare.example.com:/Volumes/X2_Data/Shares/CasperShare/ /Volumes/Data/Shares/CasperShare/

This works with the ssh key pair, but fails when rsync tries to change ownership and set times:

/usr/bin/rsync -ahvv --delete --log-file=/Users/Shared/$(date +%Y%m%d)rsynclog_nosudo.txt sharesync@mastershare.example.com:/Volumes/X2_Data/Shares/CasperShare/ /Volumes/Data/Shares/CasperShare/
sent 127.34K bytes  received 22.65M bytes  15.19M bytes/sec
total size is 109.88G  speedup is 4823.39
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(1400) [generator=2.6.9]

Hi,

Check the user and folder permissions for this folder "/Volumes/X2_Data/Shares/CasperShare" .You cant copy when there is no permission for others.By changing the permission of the source you will be able to do rsync.

-a equals -rlptgoD , which includes changing perms, owner and group. Use -rlpt instead. (omitting -g = preserve group, -o preserve owner, -D sync devices and special files)