RSS

Reset file permissions of RPM packages

0 Comments | This entry was posted on Apr 16 2009
Unlimited Online backup for 4.95/month

A disastrous mistake anyone can make on their Linux server is to chown or chmod their entire filesystem.

You can reset the permissions of packages installed with rpm.

To reset file permissions:

root@empulse:$ rpm --setperms {packagename}

To reset ownership permissions:

root@empulse:$ rpm --setugids {packagename}

RPM Database Corruption

1 Comment | This entry was posted on Apr 03 2008
GoDaddy.com Hosting & Servers

So I recently came across a situation where rpm would just hang or give out transaction errors. It turns out that the database cache files became corrupt. Here is an example of one of the errors:

warning: waiting for transaction lock on /var/lock/rpm/transaction

# cd /var/lib/rpm

Look for the files that start with double underscores “__”. These are the cache files, and you will want to delete all of them.

# rpm __*

# rpm –rebuilddb