Monday, May 19, 2014

Linux reset the permissions of the installed rpm packages with –setperms option

Reset the permissions of the all installed RPM packages

You need to use combination of rpm and a shell for loop command as follows:


for p in $(rpm -qa); do rpm --setperms $p; done
for p in $(rpm -qa); do rpm --setugids $p; done


Above command combination will reset all the permissions to the default permissions under CentOS / RHEL / Fedora Linux.

No comments:

Post a Comment