Sie sind auf Seite 1von 4

Mac Maintenance

Part 3

Repair Disk Permissions

There is considerable debate about performing Repair Permissions as part of regu-


lar maintenance. Some see it as a good prophylactic step after installing software,
particularly third-party software that employs its own installer. This is primarily
due to the fact that some poorly-written, third-party installers have been known to
change permissions on System-related folders, then neglect to set them back, caus-
ing problems after the installation.

Repairing permissions has gained the undeserved status of a "magic incantation"


that can fix anything, and some recommend it as part of regular maintenance.
While it can be a useful troubleshooting step, some do not regard it as part of regu-
lar maintenance: it probably will not hurt anything but it merely wastes time when
run unnecessarily. For more information, see the MacWorld article, “Repairing
permissions: What you need to know”.

The Mac operating system


relies on permissions to de-
termine who can do what
within certain applications.
Within the Utilities folder
on the Mac is the Disk
Utility application. From
there, you can choose to
Verify or Repair Disk
Permissions.

Page 1 of 4
How does Disk Utility check file permissions?

Many things you install in Mac OS X are installed from package files (whose file-
name 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 pack-
age'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 ap-
plication using a non-Apple installer application, or by copying it from a disk im-
age, 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.

Verification compares the current permissions settings of a file or folder against


those specified for that file or folder in its associated installation receipt. Receipts
are files saved in the Computer > Macintosh HD > Library > Receipts folder. If the
permissions of a file or folder differ from those specified in its associated receipt, its
permissions are reset (repaired) to the settings specified in the receipt.

Repair Disk Permissions will generally not correct permissions of files or folders in
the Computer > Macintosh HD > Users folder, such as your Home folder. Its focus
is primarily on System-related files or folders for which receipts are extant.

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

Page 2 of 4
Tip: If you remove receipts from /Library/Receipts/, the files installed by those
packages cannot be verified or repaired, which is why you shouldn't delete things
from /Library/Receipts/ . See Disk Utility shows a "No Valid Packages" alert.

Why are repairs needed? When should I use these functions?

Power outages, hard restarts, and system crashes can lead to disk directory corrup-
tion, requiring the use of the Repair Disk process to correct such. File System
Journaling, introduced in Panther as a default setting for the Mac OS X startup
disk, can help minimize the impact of such events on the disk's directory. How-
ever, even journaling is not foolproof. You should run the Repair Disk process if
you experience anomalous behaviour on your Mac after a power outage, hard
restart, or system crash.

Rogue installers — applications that temporarily change, but fail to reset, permis-
sions on System-related files or folders during a software installation — are a pri-
mary cause of permissions-related problems. Accordingly, it is recommended that
you run Repair Disk Permissions after installing software, particularly third-
party software that employs its own installer.

Verify or Repair?

In general, given the choice between the Verify or Repair buttons in Disk Utility,
select Repair to save time. Verify only checks for problems. If problems are found,
you then need to run the corresponding Repair. Repair both verifies and, if prob-
lems are found, attempts to perform the required repair. Accordingly, selecting the
Repair button is more efficient.

Some people also recommend installing an Apple update from within a Safe Boot
(which is activated from Mac start-up when you hold down the shift key). This
will perform a File System Check before booting up and could make an Apple up-
date install more successful.

Page 3 of 4
Safe Boot / Safe Mode
Starting up into Safe Mode does three things to simplify the startup and operation
of your computer:

• It forces a directory check of the startup volume.


• It loads only required kernel extensions (some of the items in /System/
Library/Extensions).
• In Mac OS X 10.3.9 or earlier, it runs only Apple-installed startup items
(some of the items in /Library/StartupItems and /System/Library/
StartupItems - and different than login items).
• Mac OS X 10.4 Tiger only: It disables all fonts other than those in /System/
Library/Fonts .
• Mac OS X 10.4 Tiger only: It moves to the Trash all font caches normally
stored in /Library/Caches/com.apple.ATS/(uid)/ , where (uid) is a user ID
number such as 501.
• Mac OS X 10.4 Tiger only: It disables all startup items and any Login Items.

Taken together, these changes can work around issues caused by software or
directory damage on the startup volume.

Safe Boot takes longer to boot up than a standard boot. This delay is normal for a
Safe Boot and caused by two of the things that happen during a Safe Boot:-

• Safe Boot forces a directory check of the hard drive. This is identical to us-
ing Disk Utility's Repair Disk or the fsck -fy terminal command.

• The cache of kernel extensions used to speed startup is ignored. (The cache
file is /System/Library/Extensions.kextcache )

Some Features Don't Work in Safe Mode

Safe Mode can be useful for troubleshooting. However, certain Mac OS X fea-
tures do not work when you are started up in Safe Mode. For example, you can't
use DVD Player, capture video in iMovie, use an AirPort card, use audio input or
output devices, or use an internal or external USB modem.

Page 4 of 4

Das könnte Ihnen auch gefallen