To amend the "rpm --setperms" information, that will allow you to fix the permissions of all files and directories which were installed as RPM packages. It will NOT fix the permissions of files that were installed without using RPM.
You can get a list of all the installed packages by doing "rpm -qa", for use in feeding to the "rpm --setperms". You can also use "rpm -Va | less" to have RPM do an integrity check on all installed files and directories to allow you to do more fine-grained adjusting of permissions -- it will report if the file contents, modes, and times have changed, and whether the file is a configuration file or not.
Sean