Well, if it was attempting to change something in the Library directory, it must have been something more like "chmod -R 777 ./*"
I'm afraid there's no way of getting back your permissions. If you have a backup copy, you could look at that for reference, otherwise I guess just pick a default...