nerdexam
Linux_Foundation

LFCS · Question #362

You wish to revoke write access for all groups and named users on a file. Which command will make the correct ACL changes?

The correct answer is C. setfacl m mask::rx afile. To revoke write access for all groups and named users on a file, the ACL mask must be modified to exclude write permissions.

Submitted by chiamaka_o· Apr 18, 2026Essential Commands

Question

You wish to revoke write access for all groups and named users on a file. Which command will make the correct ACL changes?

Options

  • Asetfacl x group::rx,user::rx afile
  • Bsetfacl x mask::rx afile
  • Csetfacl m mask::rx afile
  • Dsetfacl m group::rx,user::rx afile

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    14% (4)
  • C
    79% (23)
  • D
    3% (1)

Why each option

To revoke write access for all groups and named users on a file, the ACL mask must be modified to exclude write permissions.

Asetfacl x group:*:rx,user:*:rx afile

The `-x` option is used to remove specific ACL entries, not to modify the permissions of existing entries or the mask itself.

Bsetfacl x mask::rx afile

The `-x` option would attempt to remove the mask entry entirely, rather than modifying its permissions to `rx`.

Csetfacl m mask::rx afileCorrect

The `setfacl -m` command is used to modify an existing ACL entry, and setting `mask::rx` effectively removes write permission for all named users, named groups, and the owning group, as the mask defines the maximum permissions these entries can have.

Dsetfacl m group:*:rx,user:*:rx afile

While `-m` is for modifying, specifying `group:*:rx,user:*:rx` is not the correct syntax or method to universally revoke write access by manipulating the mask; the mask entry itself should be targeted.

Concept tested: Linux ACL mask modification

Source: https://www.redhat.com/sysadmin/linux-access-control-lists

Topics

#ACLs#setfacl#File Permissions#ACL Mask

Community Discussion

No community discussion yet for this question.

Full LFCS Practice