Hmm this is strange.. If you do a #chown -R userid:groupid /directory it will change everything from /drectory recursively... as to how it changed the whole filesystem when specifying the /dir argument im not sure.. if you did a '.' however - now that would be different
Im unsure how you could change permissions of root's files either - unless sudo worked i suppose.
Once you have changed the permissions of the entire filesystem i dont know that you can get them back to what they were (without manually doing it). Maybe you will need to restore your backup again ?