Thursday, February 26, 2015

How to reset the permissions of the all installed RPM packages in Centos/RHEL/Fedora


If you run 777 permission by mistake on server then you can restore default permission by running below commands .



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

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




!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

No comments:

Post a Comment

Linux server hardening | Secure Linux Servers

 Linux server hardening is the process of securing a Linux server by reducing its attack surface and mitigating security risks. The goal is ...