User changed to 502 on OSX
Solution 1:
When you create an account on a Mac, it is 501.
The 2nd account you create is 502. And so on.
When you use rsync, it copies the files as your User ID because that's all a non-root user can do.
When you ran rsync as 'sudo' it thought you wanted to copy the user as well as the file.
You should be able to fix it with
sudo chown -R $USER /path/to/rsync'd/files/
ps - you can see your user number using the id
command in Terminal.