{
  "id": 19450194,
  "title": "POSIX ACLs Are Only as Clear as the Mask",
  "url": "https://urgent.news/2026/11/11/posix-acls-are-only-as-clear-as-the-mask",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-11T05:20:45.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ioneyrezende/posix-acls-are-only-as-clear-as-the-mask-3efl"
  },
  "original_language": "en",
  "account": "POSIX ACLs are only as clear as the mask applied to them. Traditional Unix permissions distinguish between the owner, group, and everyone else's access, but POSIX ACLs add named users, groups, and a mask that limits effective permissions. This flexibility is beneficial for service accounts needing access to specific directories without joining broad groups. However, this added layer can create contradictions with the mode bits displayed by the ls command.\n\nThe acl(5) manual outlines two types of ACLs: access ACLs that control permissions on individual objects, and default ACLs on directories that determine the ACL inherited by new files and subdirectories. The access check algorithm takes into account the file mode bits, the access ACL, the process's effective user and group identities, and the ACL mask. The mask restricts every named user and group entry, including the owning group entry that corresponds to the file's group permission bits.\n\nA named user may appear to have rwx permissions, but if the mask only grants r-x, the effective permission becomes r-x. The getfacl command can display an effective comment, allowing operators to see the difference between the stored entry and the actual permission applied. This distinction is crucial during incident response. A reviewer might assume a named user can write a file based on the ACL entry, but the mask could limit that authority.\n\nChanging the group bits through a routine chmod command can also alter the mask, silently expanding named-user permissions. To avoid such issues, operators should inspect ACLs before and after mode changes, not just compare the symbolic mode string. Default ACLs on directories influence the permissions inherited by new files and subdirectories, and they override umask settings. This behavior may surprise applications expecting umask 077 to always produce private files. Before deploying services with shared data directories, operators should create test files and verify their ACLs, including those created by service accounts, archive extraction processes, and administrative tools.\n\nA process with a permissive default ACL can inadvertently create files readable by unintended groups. Default ACLs can be copied by tools that preserve permissions during backups, restores, and deployment scripts, potentially reintroducing stale named-user grants. To conduct a thorough ACL review, operators should examine the owning user and group, mode bits, access ACL, mask, named users and groups, default ACLs on parent directories, the service's effective identity and supplementary groups. Using getfacl on the actual path and comparing it with namei -l or an equivalent path walk ensures a comprehensive evaluation.\n\nAdditionally, operators should test access as the service identity using sudo -u or the platform's equivalent, avoiding tests solely as root. Confirming both permitted and denied operations, along with recording the effective ACL at the time of the test, is essential. ACL changes should be treated as security-relevant configurations, not cosmetic updates, and operators should maintain a set of tested ACL recipes, applying them consistently across environments. When implementing emergency exceptions, include an owner and expiration date, then verify that removing the named entry does not leave a lingering mask that grants unauthorized access. Ultimately, understanding the entire path and the interplay between ACL entries, mask, mode bits, inheritance, and process identity is crucial for effective access control.",
  "summary": "POSIX ACLs Are Only as Clear as the Mask Traditional Unix permissions answer a simple question: what can the owner, group, and everyone else do? POSIX access control lists add named users and groups, plus a mask that limits effective permissions. The extra flexibility is useful when a service account needs access to one directory without joining a broad group. It also creates another layer that…",
  "key_points": [
    "POSIX ACLs depend on applied mask, limiting effective permissions",
    "Access check algorithm considers mode bits, ACLs, user/group identities, and mask",
    "Default ACLs on directories influence inherited permissions, override umask"
  ],
  "editors_take": "The interplay between masks and mode bits introduces hidden permission layers that can mislead administrators and inadvertently expand access during routine file permission updates.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}