Apple - How do I repair permissions of a specific directory?
Repairing permissions only affects System files, and files installed from a package with the Installer, which give a BOM (Bill Of Materials, stored in the (~)/Receipts
folder) that list the expected permissions. There is no meaning in repairing permissions for “a specific directory“, as an arbitrary directory has no expected permissions against which to compare, unless it is one listed in one of the said files.
(just for sourcing: Wikipedia agrees ;) )
If you want to change permissions of a lot of files at once, for example by having copied them from another drive with permissions, and you encounter problems with them, you could use a tool such as BatchMod :)
The act of "repairing permissions" is a very specific system-level only process. There is nothing in the UNIX-like world (such as BSD, which OS X is based on) that defines what a "correct" permission is. According to a Genius I spoke with at my local Apple Store, there is simply some file that lists important system files/folders, and clicking "Repair Disk Permissions" simply applies the appropriate permissions on the contents of that list.
Client file permissions have no "correct permission" because they can be whatever you want to achieve.