User changed to 502 on OSX I have a small problem with my permissions. I use rsync frequently on a certain target directory, but one day I by accident I used "sudo rsync", and now all my permissions for the files in the directory have been changed to user 502. Can anyone provide me with a clue as to why this happened, and why user 502? thanks.
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.