Using chmod, I accidentally changed everything in a bin folder and now sudo/su doesn't work.
I know rpm -q --whatprovides can provide which RPM provides a specific file. and rpm --setperms can restore everything provided by a RPM.
Is there a way to restore the permissions of all the files in a folder using rpm?