It depends on what package manager do you use and what environment do you have.
Linux by itself does not have such tools, because many software exists for Linux, and many of them may require special file handling or execution modes (i.e. setuid binaries or mailbox-like directories with special privilege assigned), unlike Mac (I assume OS X), because Mac is more closed pool and OS X designers do know what software will be preloaded on typical Mac and have guidelines for installing packages.
If a package manager can debug such an issues, then - nice, you should check your package manager docs for that.
If you're messed with root file system, then it's safe to backup a current list of privileges first:
find / -xdev -exec ls -ld '{}' ';' >>/root/perms.lst
(do that for each mount point related to system binaries, for example, /usr)
then resetting everything back to root (0:0). If you had any special setuid binaries that will be touched by such a reset, you will be able to reset their status later by examining /root/perms.lst file.
For chmod permissions, it's harder to advice anything like chmod 644 or chmod 755, you should examine your files before making changes, because there can be a security concerns.