nerdexam
CompTIA

LX0-104 · 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. This question asks for the correct setfacl command to revoke write access for all groups and named users on a file by modifying the ACL mask.

Administrative Tasks

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

(35 responses)
  • A
    9% (3)
  • B
    3% (1)
  • C
    83% (29)
  • D
    6% (2)

Why each option

This question asks for the correct `setfacl` command to revoke write access for all groups and named users on a file by modifying the ACL mask.

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

The `-x` option is used to remove an ACL entry, not to modify or revoke specific permissions within existing entries.

Bsetfacl x mask::rx afile

The `-x` option would remove the entire mask entry, rather than modifying its permissions to revoke write access.

Csetfacl m mask::rx afileCorrect

The `setfacl -m mask::rx afile` command correctly uses the `-m` option to modify an ACL entry and specifically targets the `mask::` entry, setting its permissions to `rx` (read and execute). By limiting the mask to `rx`, it revokes write access for all named user, named group, and owning group entries whose effective permissions are governed by the mask.

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

This command attempts to modify permissions for all named users and groups directly, which is not the standard or efficient way to revoke a specific permission across all relevant ACL entries; the mask is designed for this purpose.

Concept tested: Linux ACL modification via mask

Source: https://linux.die.net/man/1/setfacl

Topics

#ACLs#setfacl#file permissions#mask

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice