Repair permissions

Last updated

Repairing disk permissions is a troubleshooting activity commonly associated with the macOS operating system by Apple. The efficacy of repairing permissions to troubleshoot application errors has been debated. [1]

Contents

Overview

The BSD layer in macOS 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 macOS 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 directory (/Library/Receipts) on the volume being checked. Whenever a user installs software that uses the macOS 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 macOS. Repairing permissions can become necessary, but has become increasingly less so for versions after Panther (10.3). [1]

In OS X El Capitan, Apple introduced a security feature called System Integrity Protection. With it enabled, root privileges are no longer able to change system files and folders, including their permissions. Permissions repairs are instead performed automatically upon system installs and updates. [4] To that end, Disk Utility as well as the corresponding diskutil command-line utility lost the ability to repair permissions. [5]

Usage

In systems prior to OS X El Capitan, a permissions repair can be performed by selecting a startup volume and clicking the "Repair Disk Permissions" button in the "First Aid" section of Disk Utility. The operation can also be performed by using the diskutil command-line utility. [6] In El Capitan, the user can instead use two command-line utilities: pkgutil to repair particular packages or /usr/libexec/repair_packages to repair a standard set of system packages. [7] [8] In both cases, the user has to disable System Integrity Protection to change permissions of system files and directories. In macOS Sierra, /usr/libexec/repair_packages is not available.

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

Related Research Articles

The Single UNIX Specification (SUS) is the collective name of a family of standards for computer operating systems, compliance with which is required to qualify for using the "UNIX" trademark. The core specifications of the SUS are developed and maintained by the Austin Group, which is a joint working group of IEEE, ISO JTC 1 SC22 and The Open Group. If an operating system is submitted to The Open Group for certification, and passes conformance tests, then it is deemed to be compliant with a UNIX standard such as UNIX 98 or UNIX 03.

AppleScript is a scripting language created by Apple Inc. that facilitates automated control over scriptable Mac applications. First introduced in System 7, it is currently included in all versions of macOS as part of a package of system automation tools. The term "AppleScript" may refer to the language itself, to an individual script written in the language, or, informally, to the macOS Open Scripting Architecture that underlies the language.

In computing, a symbolic link is a term for any file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution.

uname Standard UNIX utility that prints name and other details about the machine

uname is a computer program in Unix and Unix-like computer operating systems that prints the name, version and other details about the current machine and the operating system running on it.

In computing, a loadable kernel module (LKM) is an object file that contains code to extend the running kernel, or so-called base kernel, of an operating system. LKMs are typically used to add support for new hardware and/or filesystems, or for adding system calls. When the functionality provided by an LKM is no longer required, it can be unloaded in order to free memory and other resources.

Utility software is software designed to help analyze, configure, optimize or maintain a computer. It is used to support the computer infrastructure - in contrast to application software, which is aimed at directly performing tasks that benefit ordinary users. However, utilities often form part of the application systems. For example, a batch job may run user-written code to update a database and may then include a step that runs a utility to back up the database, or a job may run a utility to compress a disk before copying files.

These tables provide a comparison of operating systems, of computer devices, as listing general and technical information for a number of widely used and currently available PC or handheld operating systems. The article "Usage share of operating systems" provides a broader, and more general, comparison of operating systems that includes servers, mainframes and supercomputers.

launchd is an init and operating system service management daemon created by Apple Inc. as part of macOS to replace its BSD-style init and SystemStarter. There have been efforts to port launchd to FreeBSD and derived systems.

Disk Utility Software for Apple macOS

Disk Utility is a system utility for performing disk and disk volume-related tasks on the macOS operating system by Apple Inc.

Extended file attributes are file system features that enable users to associate computer files with metadata not interpreted by the filesystem, whereas regular attributes have a purpose strictly defined by the filesystem. Unlike forks, which can usually be as large as the maximum file size, extended attributes are usually limited in size to a value significantly smaller than the maximum file size. Typical uses include storing the author of a document, the character encoding of a plain-text document, or a checksum, cryptographic hash or digital certificate, and discretionary access control information.

Portable application Type of computer program

A portable application, sometimes also called standalone, is a program designed to read and write its configuration settings into an accessible folder in the computer, usually in the folder where the portable application can be found. This makes it easier to transfer the program with the user's preferences and data between different computers. A program that doesn't have any configuration options can also be a portable application.

Apple Disk Image Disk image file format developed by Apple and commonly used by macOS

AppleDisk Image is a disk image format commonly used by the macOS operating system. When opened, an Apple Disk Image is mounted as a volume within the Finder.

Gatekeeper (macOS)

Gatekeeper is a security feature of the macOS operating system by Apple. It enforces code signing and verifies downloaded applications before allowing them to run, thereby reducing the likelihood of inadvertently executing malware. Gatekeeper builds upon File Quarantine, which was introduced in Mac OS X Leopard and expanded in Mac OS X Snow Leopard. The feature originated in version 10.7.3 of Mac OS X Lion as the command-line utility spctl. A graphical user interface was originally added in OS X Mountain Lion (10.8) but was backported to Lion with the 10.7.5 update.

Haiku Applications

Haiku is a free and open-source operating system compatible with the now discontinued BeOS.

OS X El Capitan Twelfth major release of macOS

OS X El Capitan is the twelfth major release of macOS, Apple Inc.'s desktop and server operating system for Macintosh. It focuses mainly on performance, stability, and security. Following the Northern California landmark-based naming scheme introduced with OS X Mavericks, El Capitan was named after a rock formation in Yosemite National Park. El Capitan is the final version to be released under the name OS X. OS X El Capitan received far better reviews than did Yosemite.

System Integrity Protection

System Integrity Protection is a security feature of Apple's macOS operating system introduced in OS X El Capitan (2015). It comprises a number of mechanisms that are enforced by the kernel. A centerpiece is the protection of system-owned files and directories against modifications by processes without a specific "entitlement", even when executed by the root user or a user with root privileges (sudo).

macOS Sierra Thirteenth major release of macOS

macOS Sierra is the thirteenth major release of macOS, Apple Inc.'s desktop and server operating system for Macintosh computers. The name "macOS" stems from the intention to uniform the operating system's name with that of iOS, watchOS and tvOS. Sierra is named after the Sierra Nevada mountain range in California and Nevada. Its major new features concern Continuity, iCloud, and windowing, as well as support for Apple Pay and Siri.

macOS Mojave 15th major version of the macOS operating system

macOS Mojave is the fifteenth major release of macOS, Apple Inc.'s desktop operating system for Macintosh computers. Mojave was announced at Apple's Worldwide Developers Conference on June 4, 2018, and was released to the public on September 24, 2018. The operating system's name refers to the Mojave Desert and is part of a series of California-themed names that began with OS X Mavericks. It succeeded macOS High Sierra and was followed by macOS Catalina.

macOS Catalina 16th major version of the macOS operating system

macOS Catalina is the sixteenth major release of macOS, Apple Inc.'s desktop operating system for Macintosh computers. It is the successor to macOS Mojave and was announced at WWDC 2019 on June 3, 2019 and released to the public on October 7, 2019. Catalina is the first version of macOS to support only 64-bit applications and the first to include Activation Lock. It is also the last version of macOS to have the major version number of 10; its successor, Big Sur, released on November 12, 2020, is version 11. In order to increase web compatibility, Safari, Chromium and Firefox have frozen the OS in the user agent running in subsequent releases of macOS at 10.15.7 Catalina.

References

  1. 1 2 Gruber, John. "Seriously, 'Repair Permissions' Is Voodoo". Daring Fireball. John Gruber. Retrieved March 13, 2009.
  2. "Security Overview: Permissions". Apple Developer . Archived from the original on June 26, 2004. Retrieved April 4, 2007.
  3. "About Disk Utility's Repair Disk Permissions feature". Apple Support. Archived from the original on November 13, 2014. Retrieved April 4, 2007.
  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
  7. pkgutil(1)    Darwin and macOS General Commands Manual
  8. repair_packages(8)    Darwin and macOS System Manager's Manual