nerdexam
CompTIA

LX0-103 · Question #103

What command should be invoked to give the user sally read and write, but not execute, access to the file strategy.txt using Extended ACL entries?

The correct answer is C. setfacl-m user: sally; rwstrategy.txt. The setfacl -m user:name:permissions syntax is the correct form for granting a named user specific ACL-based access to a file.

GNU and Unix Commands

Question

What command should be invoked to give the user sally read and write, but not execute, access to the file strategy.txt using Extended ACL entries?

Options

  • Asetfacl -setperm sally:rw strategy.txt
  • Bsetfacl -m user::sally+rw strategy.txt
  • Csetfacl-m user: sally; rwstrategy.txt
  • Dsetfacl -setperm user:sally+rw strategy.txt

How the community answered

(29 responses)
  • A
    10% (3)
  • B
    3% (1)
  • C
    72% (21)
  • D
    14% (4)

Why each option

The `setfacl -m user:name:permissions` syntax is the correct form for granting a named user specific ACL-based access to a file.

Asetfacl -setperm sally:rw strategy.txt

The flag `-setperm` does not exist in `setfacl`; additionally, the entry omits the required `user:` qualifier before the username, making the ACL entry syntactically invalid.

Bsetfacl -m user::sally+rw strategy.txt

The `user::` double-colon form specifies the ACL entry for the file's owning user, not a named user - it would not apply the permission to sally specifically.

Csetfacl-m user: sally; rwstrategy.txtCorrect

Option C, despite containing formatting artifacts from the source material, represents the intended `setfacl -m u:sally:rw strategy.txt` pattern. The `-m` (modify) flag combined with the `user:sally:rw` ACL entry specification correctly grants sally read and write permissions while omitting execute, which is the expected Extended ACL method for named-user entries.

Dsetfacl -setperm user:sally+rw strategy.txt

Like option A, `-setperm` is not a valid `setfacl` flag; the correct flag for adding or modifying ACL entries is `-m` (modify).

Concept tested: Setting named-user extended ACL entries with setfacl -m

Source: https://man7.org/linux/man-pages/man1/setfacl.1.html

Topics

#ACL#setfacl#extended permissions#user access control

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice