Disk Utility’s Repair Disk Permissions feature

Repair Disk Permissions Learn about Disk Utility’s Repair Disk Permissions feature. This document applies to Mac OS X 10.2, 10.3, and 10.4 or later.

Disk Utility lets you verify and repair disk and permissions issues. This document explains one of Disk Utility’s features for Mac OS X disks, Repair Disk Permissions.

How does Disk Utility check file permissions?

Many things you install in Mac OS X are installed from package files (whose filename extension is “.pkg”). Each time something is installed from a package file, a “Bill of Materials” file (whose filename extension is “.bom”) is stored in the package’s receipt file, which is kept in /Library/Receipts/. If you look in the Receipts folder, for example, you should see all kinds of files that end with .pkg, including some that were created when Mac OS X was installed (for example, BaseSystem.pkg). Don’t worry, these files don’t take up much disk space and you shouldn’t put them in the Trash.

Each of those “.bom” files contains a list of the files installed by that package, and the proper permissions for each file.

When you use Disk Utility to verify or repair disk permissions, it reviews each of the .bom files in /Library/Receipts/ and compares its list to the actual permissions on each file listed. If the permissions differ, Disk Utility reports the difference (and corrects them if you use the Repair feature).

Does Disk Utility check permissions on all files?

Files that aren’t installed as part of an Apple-originated installer package are not listed in a receipt and therefore are not checked. For example, if you install an application using a non-Apple installer application, or by copying it from a disk image, network volume, or other disk instead of installing it via Installer, a receipt file isn’t created. This is normal. Some applications are just designed to be installed like that.

Also, certain files whose permissions can be changed during normal usage without affecting their function are intentionally not checked.

Read More

What is a bad sector?

A sector is a small area on the surface of a hard drive or a floppy disk.

Hard drives usually have several platters. The platters are the discs which are covered with magnetic material which is used to hold data. Floppy disk drives contain only one platter.

Platters are divided into a set of concentric rings called tracks. A 1.44MB floppy disk has 160 tracks. Hard drives have thousands of tracks.

Each of these tracks is divided into smaller storage areas called sectors. A sector is the smallest storage area on a disk.

What is a Bad Sector?

Hard drives are contain millions of sectors. It is very normal for some of these sectors to be bad sectors, even when the drive is first manufactured.

In addition, a small number of sectors will normally go bad during the lifespan of a drive.

When this happens, the data in those sectors may be lost, but the data on the rest of the disk will be unaffected and the disk is still completely usable.

A bad sector cannot be repaired, but it can be marked as unusable. Once marked as unusable, the Operating System will know not to attempt to store data in that bad sector. The storage capacity of the disk will be decreased by the amount of storage space in the bad sector.

If your hard drive develops a bad sector, back the hard drive up immediately. If the bad sector was caused by a faulty drive head, the problem can quickly spread to other sectors on the disk.

Read More