Jump to content

Repair permissions

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Totie (talk | contribs) at 16:23, 11 June 2015. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Repairing disk permissions is a troubleshooting activity commonly associated with the OS X (formerly Mac OS X) operating system by Apple Inc. The efficacy of repairing permissions to troubleshoot application errors has been debated.[1]

Overview

The BSD layer in OS X (and Darwin) is responsible for file-system security, including the management of the Unix (POSIX) permissions model. Applications depend on the correct assignment and interpretation of permissions in order to function properly.[2]

Repairing permissions involves checking the permissions of a set of files and folders on a volume with OS X installed against a list of correct POSIX permissions and correcting any discrepancies. The list of correct permissions is compiled by consulting the various bill-of-materials (.bom) files. Typically, these files are stored within reduced-size Installer package (.pkg) files in the Receipts folder in the local Library folder (/Library/Receipts) on the volume being checked. Whenever a user installs software that uses the OS X Installer package format, a bill-of-materials file is created which can be consulted for future permission repair.[3]

Files whose permissions have been incorrectly altered by an administrator, an administrator operating with root privileges, or a poorly designed installer package (installed with similar privileges) can cause a wide array of problems ranging from application errors to the inability to boot OS X. Repairing permissions can become necessary, but has become increasingly less so for versions of the OS after Panther (10.3).[1]

With the upcoming OS X El Capitan, Apple introduces a new security feature called System Integrity Protection. Root privileges shall no longer suffice to change system files and folders, including their permissions. Permissions repairs shall be performed automatically upon system installs and updates.[4] To that end, Disk Utility loses the ability to repair permissions, although the corresponding diskutil operation remains available.[5]

Usage

A permissions repair can be performed using Disk Utility (/Applications/Utilities/Disk Utility.app) by selecting an OS X startup volume and clicking the Repair Disk Permissions button in the First Aid section. A verification procedure, which will only check permissions, but not perform repairs, is also available. Both operations can be performed by using the diskutil command-line utility,[6] which can be executed via local Terminal or remotely via SSH or the Send UNIX Command in Apple Remote Desktop:

diskutil repairPermissions /Volumes/<disk name>

Permissions can also be repaired using third-party utilities such as The Apotek's AppleJack or Prosoft Engineering's Drive Genius.

References

  1. ^ a b Gruber, John. "Seriously, 'Repair Permissions' Is Voodoo". Daring Fireball. John Gruber. Retrieved March 13, 2009. {{cite web}}: Cite has empty unknown parameter: |coauthors= (help)
  2. ^ "Security Overview: Permissions". Developer. Apple Inc. Retrieved April 4, 2007. {{cite web}}: Cite has empty unknown parameter: |coauthors= (help); External link in |work= (help) [dead link]
  3. ^ "About Disk Utility's Repair Disk Permissions feature". Knowledge Base. Apple Inc. Retrieved April 4, 2007. {{cite web}}: Cite has empty unknown parameter: |coauthors= (help); External link in |work= (help)
  4. ^ "OS X v10.11". Mac Developer Library. Apple Inc. June 8, 2015. Retrieved June 11, 2015.
  5. ^ "OS X v10.11 Developer Beta 1 Release Notes". Mac Developer Library. Apple Inc. June 8, 2015. Retrieved June 11, 2015.
  6. ^ diskutil(8) – Darwin and macOS System Manager's Manual