Disk Permissions Database Read Failure in OS X 10.5.6 caused by corruption in /Library/Receipts folder
This blog entry is not for the feint of heart. You need to be the type of person who feels comfortable in Terminal and knows what rsync is. I DON’T REP and WARRANT that this will work on your machine. For all I know it might make things worse. I am ONLY reporting what worked on MY MACHINE. Having said that, I wish this blog entry had been around for me, it would have saved me a couple of days of thrashing…
My problems were caused by my boot disk quietly committing suicide by inches. I replaced the disk, but still got the following errors because that original disk clearly hated me…
By default, SuperDuper wants to fix disk permissions before every backup. So if you have had your SuperDuper backup fail with the following error, then this blog entry is for you.
- | 09:30:26 PM | Info | …ACTION: Repairing permissions on RAID
- | 09:30:26 PM | Info | ……COMMAND => Repairing permissions on RAID
- | 09:30:28 PM | Info | Started verify/repair permissions on disk disk4 RAID
- | 09:30:28 PM | Info | Error -9972: The underlying task reported failure on exit
- | 09:30:28 PM | Info |
- Finished verify/repair permissions on disk disk4 RAID
- | 09:30:28 PM | Info | Error detected while verifying/repairing permissions on disk4 RAID: The underlying task reported failure on exit (-9972)
- | 09:30:28 PM | Error | ****FAILED****: result=256 errno=22 (Unknown error: 0)
Or if you have run Disk Utility->Repair Disk Permissions and gotten the following error then this blog is for you.
- Error | ****FAILED****: result=256 errno=22 (Unknown error: 0)
Or if you have run DiskWarrior->Repair Disk Permissions and gotten the following error then this blog is for you.
- DiskWarrior error 2903, -8902
1. cd into your Time Machine Volume holding the snapshots of your machine.
On my machine:
- cd /Volumes/Backup\ of\ Stuart/Backups.backupdb/Stuart
2. The following will compare (without doing anything) all the latest snapshots with your broken diskRemember to change 2009-02 to whatever YYYY-MM is current for you and /Volumes/SuperDuperBackup to your disk volume that is getting the permissions error.
On my machine:
- for i in `ls | grep 2009-02`; do echo $i;rsync -avz —dry-run $i/Macintosh\ HD/Library/Receipts/ /Volumes/SuperDuperBackup/Library/Receipts/;done
You will get output like this:
<rsync output>
- 2009-02-01-000135
- building file list … done
- ./
- boms/
- db/
- db/a.receiptdb
- sent 237644 bytes received 572 bytes 52936.89 bytes/sec
- total size is 451835534 speedup is 1896.75
- 2009-02-02-005839
- building file list … done
- ./
- boms/
- db/
- db/a.receiptdb
- <…I had a bunch of snapshots here…>
- 2009-02-14-000056
- building file list … done
- ./
- boms/
- db/
- db/a.receiptdb
- sent 237644 bytes received 572 bytes 95286.40 bytes/sec
- total size is 451835534 speedup is 1896.75
- 2009-02-15-001812
- building file list … done
- sent 266223 bytes received 548 bytes 76220.29 bytes/sec
- total size is 213404079 speedup is 799.95
- 2009-02-16-001758
- building file list … done
- sent 266223 bytes received 548 bytes 177847.33 bytes/sec
- total size is 213404079 speedup is 799.95
- 2009-02-17-000302
- building file list … done
- sent 266223 bytes received 548 bytes 106708.40 bytes/sec
- total size is 213404079 speedup is 799.95
</rsync output>
3. Which informs us that the disk permissions database stuff got corrupted between snapshots:2009-02-14-000056 AND 2009-02-15-001812. Notice, that 2009-02-15-001812 doesn’t have any changes from the current (BROKEN) system. Ergo the snap shot right before it 2009-02-14-000056 is the MOST RECENT good permissions data base.
4. so to fix my system, I restored that directory from 2009-02-14-000056 with the following commands:
- > cd /Volumes/Backup of Stuart/Backups.backupdb/Stuart/2009-02-14-000056/Macintosh HD/Library/
- > sudo rsync -avz Receipts/ /Volumes/SuperDuperBackup/Library/Receipts/
<here is the output from the rsync>
- Password:
- building file list … done
- ./
- boms/
- db/
- db/a.receiptdb
- sent 27675899 bytes received 588 bytes 1085352.43 bytes/sec
- total size is 451835534 speedup is 16.33
5. You run Disk Utility choose the offending Volume, use First Aid and click on “repair disk permissions” and life is happy again!!!! In my case, I got a bunch of repairs and warnings, but I no longer get that annoying failure “Reading the permissions database”!!!
Good Luck!
- Stuart