nerdexam
CompTIA

LX0-104 · Question #361

What is true about the permissions for the file afile given the following output from getfacl? (Select TWO correct answers) % getfacl afile # file: afile # owner: matt # group: support user::rwx…

The correct answer is B. The user hugh will be able to read the contents of the file. E. Anyone in the staff group will be able to read and execute the file. This question assesses the understanding of Linux file Access Control Lists (ACLs) by interpreting permissions for various users and groups from getfacl output.

Administrative Tasks

Question

What is true about the permissions for the file afile given the following output from getfacl? (Select TWO correct answers) % getfacl afile # file: afile # owner: matt # group: support user::rwx user:hugh:rw group::r group:staff:rx mask::rwx other::r

Options

  • AAnyone in the support group will be able to read and execute the file.
  • BThe user hugh will be able to read the contents of the file.
  • CAnyone in the users group will be able to read the file.
  • DThe user matt will not be able to edit this file.
  • EAnyone in the staff group will be able to read and execute the file.

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    81% (22)
  • C
    4% (1)
  • D
    11% (3)

Why each option

This question assesses the understanding of Linux file Access Control Lists (ACLs) by interpreting permissions for various users and groups from `getfacl` output.

AAnyone in the support group will be able to read and execute the file.

The owning group 'support' is granted only read permission (`group::r`), not execute.

BThe user hugh will be able to read the contents of the file.Correct

The ACL entry `user:hugh:rw` explicitly grants the user 'hugh' read and write permissions, and the mask `rwx` does not restrict these permissions, thus allowing read access.

CAnyone in the users group will be able to read the file.

There is no specific ACL entry for a group named 'users'; the `user::` entry applies to the file owner.

DThe user matt will not be able to edit this file.

The file owner 'matt' has `rwx` permissions (`user::rwx`), which includes write access, allowing him to edit the file.

EAnyone in the staff group will be able to read and execute the file.Correct

The ACL entry `group:staff:rx` explicitly grants the 'staff' group read and execute permissions, and the mask `rwx` does not restrict these permissions, allowing members of 'staff' to read and execute the file.

Concept tested: Linux file ACL interpretation

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

Topics

#ACLs#file permissions#getfacl#mask

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice