X

Privileges/Permissions and Native vs. Foreign volumes

Privileges/Permissions and Native vs. Foreign volumes

CNET staff
4 min read
We have previously posted several items on Mac OS X privileges (also known as permissions) settings in the Show Info window, as well as in Terminal (see one and two for example). We have also noted the "Ignore Privileges" option in the Show Info window of volumes (see one and two for example) - which effectively turns off all restrictive privileges for that volume.

As a follow-up to all of this, we would like to call your attention to an Apple Release Note on permissions titled Macintosh Extended Format Disks: Native or Foreign. It has important information about how Mac OS X determines if the permissions on a volume will be enforced or not. Here are some quotes:

    Only HFS Plus disks can switch permissions on and off All volume formats except Macintosh Extended Format are fixed in their maintenance and enforcement of permissions: the volume format either supports maintenance of permission information on the disk, in which case the on-disk permissions are always enforced, or the volume format does not include support for on-disk permission information, in which case no permissions can be enforced. The UNIX or UFS disk format, for instance, includes support for permissions; the Macintosh Standard disk format does not.

    Native disks and the 64-bit volume identifier Macintosh Extended Format disks are treated slightly differently: every individual disk is assigned a unique 64-bit volume identifier and the system maintains a list of the volume identifiers of the disks that have been connected. Disks whose volume identifier is included in this list are treated as native disks; all other disks are treated as foreign.

    When Mac OS X is first installed and started, all disks connected are marked as native. Subsequently, any Macintosh Extended Format disks that are connected to the system that have not been tagged with a 64-bit volume identifier are assigned a new, unique 64-bit volume identifier and marked as native. Permissions on Macintosh Extended Format disks that are native to the system are enforced; permissions on Macintosh Extended Format disks that are foreign are ignored, since the interpretation of permission information is system-specific and it is not necessarily meaningful to use permission information stored on a foreign disk.

    Using "Ignore privileges" Besides this automatic mechanism the system can be configured explicitly to enforce ignore the permissions stored on selected Mac OS Extended Format disks through the Finder's permissions interface, causing a native disk to be treated as though it were foreign, or a foreign disk as if it were native.

    The "Permissions" panel of the Finder's Inspector window in Mac OS X includes a checkbox labeled "Ignore privileges on this volume": if this checkbox is checked, the disk is treated as if foreign and all file and directory permissions actually stored on the disk are ignored; the owner is changed to the current user and the group is changed to "unknown". Files and directories created on a foreign disk whose permissions are being ignored are created with the owner and group fields both set to "unknown."

Changing privileges settings Donald Nash offers this comment regarding who has permission to make what changes to privileges settings:

    Users cannot change the permissions of files they do not own. Only the owner of a file or root can change the permissions of a file. Further, no one but root can change the owner of a file. Even if you own a file, you cannot change its owner to be someone else. This is a Unix security measure designed to prevent people from evading their disk quotas by giving their files away. Finally, the only privilege required to delete a file is write permission to the directory containing the file. Having write access to the file itself, or even owning the file at all, is not an issue. Most programs will ask you to confirm that you really want to delete a file if you don't have write permission to it, but that's just a safety measure written into each program. As in all other aspects of Unix, it is the kernel which ultimately enforces permissions and policies, and the kernel will unquestioningly allow any program to delete a file if the user running the program has write permission to the directory containing the file.

Using Terminal to change permissions You can use the <chmod> command to change privileges in Terminal, as an alternative to using the Show Info Privileges window (see this page for details). However, according to Shawn Platkus, changes made here are not reflected in the Finder until you log out and log back in.