Create Flexible Permissions Hierarchies with POSIX ACLs
When Unix mode-based permissions just aren’t enough, use an ACL.
Most of
the time, the traditional Unix file
permission system fits the bill just fine. But in a highly
collaborative environment with multiple people needing access to
files, this scheme can become unwieldy. Access control lists,
otherwise known as ACLs (pronounced to rhyme
with “hackles”), are a feature that
is relatively new to the Linux operating system, but has been
available in FreeBSD and Solaris for some time. While ACLs do not
inherently add “more security” to a
system, they do reduce the complexity of managing permissions. ACLs
provide new ways to apply file and directory permissions without
resorting to the creation of unnecessary groups.
ACLs are stored as extended attributes within the filesystem metadata. As the name implies, they allow you to define lists that either grant or deny access to a given file based on the criteria you provide. However, ACLs do not abandon the traditional permission system completely. ACLs may be specified for both users and groups and are still separated into the realms of read, write, and execute access. In addition, a control list may be defined for any user or group that does not correspond to any of the user or group ACLs, much like the “other” mode bits of a file. Access control lists also have what is called an ACL mask, which acts as a permission mask for all ACLs that specifically mention a user and a group. This ...