Sutff about my job and comments about personal activities. Take a look to the first idea.

Sunday, January 07, 2007

Restore file modes from rpm database

As usual root access gives unlimited power, but a misusage could give you a few headaches, in my case, a user change the ownership and modes in the files of almost all the filesystem, so I googled for a solution and found that the rpm database could be used to restore the files from rpms packages, you could use a command like:

rpm -qa | xargs rpm --setperms --setugids

I just love how simple a solution could get you out of troubles...