All lessons Leer en español

Security in depth · Unit 22 · Lesson 22 of 44

Case: review an archive's Linux permissions

Read an ACL, separate old files from new defaults, and propose the smallest justified correction.

10 minready

Helpful before thisACLs add named permissionsNew files begin with a permission decision

After this lesson you can

  • Calculate effective file rights from a named-user ACL entry and its mask.
  • Distinguish current permissions, observed use, and the policy for newly created files.
  • Write a narrow remediation proposal with evidence, owners, acceptance criteria, and remaining gaps.

Harbor Archive, a fictional community project, publishes internal summaries through an export service. Nina owns the data and approves access. Leo maintains the service. They ask you for a written review of the supplied records before any change. Your deliverable is a reasoned proposal, not an instruction to operate a machine.

A permission review compares effective authority over a defined resource with its owner’s approved need, then records differences, evidence, and unresolved questions.

Stage 1: establish the rules of the case

Assume ordinary, unprivileged processes, valid Linux access ACLs, and the identities and memberships shown below. All required parent directories permit path search. There are no override capabilities, additional blocking policies, or previously opened file descriptors affecting these decisions. Evaluate new requests to read or write regular-file content. Directory entry deletion and replacement are outside this packet.

E1: Nina’s approved requirements. The archive-worker identity must read and write summaries. Members of reviewers may read them, but not change their content. Maya, who is outside reviewers and TempCrew, may read only legacy-summary until Friday. TempCrew and other identities have no approved content access. Maya’s temporary exception does not extend to future summaries.

E2: legacy-summary’s complete access ACL. Its owner is archive-worker and owning group is reviewers. The identities used to evaluate TempCrew and other are not the owner or members of reviewers.

Entry Listed rights
Owner: archive-worker Read, write
Named user: Maya Read, write
Owning group: reviewers Read
Named group: TempCrew Read, write
ACL mask Read
Other Read

E3: proposed new-file policy. The service requests mode 0666 with creation mask 0027 in an output directory without a default ACL. New files belong to archive-worker and reviewers. One supplied sample was created directly there as 0640, with no named ACL entries or later permission changes.

E4: activity sample. One job wrote a summary and one reviewer read it. This packet contains no other activity records. It does not document all staging files, historical access, or alternative output paths.

Separate two permission decisions E2: Maya has effective read; TempCrew and other also have read beyond the approved need. E3: new files begin at 0640 under the stated conditions, without changing the old file. Verify both decisions separately against E1. Two permission decisions E2 · Existing file Maya: effective read TempCrew + other: read Those extra grants exceed E1 E3 · Newly created file Request 0666 · umask 0027 No default ACL → 0640 Existing file stays unchanged Verify each against E1 Required content access works Unapproved access is denied Granted access ≠ observed use
The old file and new-file policy need separate decisions. Permission evidence establishes grants; activity evidence establishes only the observations it actually contains.
PredictMaya’s entry says read/write. Does E2 establish that she can write the old summary?

No. Her matching named-user entry is limited by the read-only mask. It currently grants read, matching her temporary requirement. Widening that shared mask would also affect other entries, including TempCrew’s listed write permission.

Stage 2: separate two different findings

E2 gives TempCrew effective read through its masked group entry. The other entry also grants read and is not limited by the mask. Both exceed E1. E4 does not show these rights being used, but absence from one activity sample does not remove a grant or prove that nobody used it previously.

E3 produces 0640 under its stated conditions: owner read/write, group read, other none. That fits the approved future-summary audience, including exclusion of Maya. It leaves E2 unchanged. Also distinguish the process creation mask from the access ACL mask; they govern different decisions despite sharing the word “mask.”

Reveal a model remediation proposal

For legacy-summary, propose retaining owner read/write, reviewers read, and Maya read through Friday. Remove TempCrew’s entry and other read, retain a read-only ACL mask, and narrow Maya’s listed entry to read. Narrowing Maya’s entry does not reduce her current effective access; it prevents that entry’s unused write bit from becoming effective if the mask later changes.

For future summaries, retain E3’s intended result and verify the service’s actual output behavior separately. Do not add Maya to reviewers merely to simplify this one-file exception: that would broaden her access beyond E1. Nina approves the scope and expiry; Leo owns a scheduled implementation and verification plan. Record removal of Maya’s exception after Friday as an explicit follow-up.

Stage 3: define what would count as success

In an owner-approved validation setting with synthetic content, require archive-worker to retain content read/write and reviewers to retain read. Require Maya’s legacy-file read before expiry to succeed while her write is denied. Require TempCrew and an ordinary unapproved identity to be denied content access. Confirm future summaries preserve their separate audience. Retain object identifiers, identity context, reviewed ACLs, and outcomes as evidence.

PredictThe next summary passes the new-file checks. Can you close the legacy-summary finding too?

No. A successful new-object result does not verify an existing object’s ACL. Record the two acceptance results independently, and keep the legacy finding open until its own criteria are met.

Finish with residual gaps: the packet does not establish historical disclosure or permissions for staging locations and directory entry changes. Give each follow-up an owner. Arrange an approved recovery option if legitimate work fails during the scheduled change, without treating restoration of broad access as permanent acceptance. A scoped correction should preserve useful work and make its limits visible.

Check yourself

No timer. No penalties. Read the explanation and try again whenever you like.

  1. E2 lists read/write for Maya and read in the mask. Under the supplied assumptions, what can Maya do through this ACL entry?

    Show the answer

    Correct answer: Read only; the entry lists write but the mask does not permit it. Effective rights are limited to the permissions present in both the matching entry and the mask. Maya is not the owner in this case.

  2. Leo adopts E3's new-file settings. What conclusion about legacy-summary is justified?

    Show the answer

    Correct answer: Its existing access ACL still requires a separate correction and verification. A creation policy controls new objects in the stated creation path. It does not rewrite the ACL of a file that already exists.

  3. E4 contains no TempCrew read. Which statement belongs in the review?

    Show the answer

    Correct answer: E2 grants TempCrew read beyond E1's approved need; this packet does not establish whether it was used. This keeps the permission finding separate from an unproven claim about historical activity.

  4. Which acceptance result best supports closing the supplied legacy-file permission finding?

    Show the answer

    Correct answer: Approved ordinary identities retain required file access, while synthetic unapproved identities are denied, with the reviewed ACL recorded. This combines configuration evidence with allowed and denied outcomes using the relevant contexts. Historical use and unreviewed paths remain separate gaps.

Try it

  • WriteUsing only E1-E4, write a one-page review: two findings, the evidence supporting each, proposed legacy-file rights, the separate new-file decision, Nina and Leo’s responsibilities, two allowed and two denied acceptance outcomes, and two unresolved gaps. Reveal the model answer afterward. Do not inspect or change a real system.
References