LFCS · 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. The getfacl output details specific permissions for the file afile, including those for a named user and a named group, which are then evaluated against the ACL mask.
Question
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
(20 responses)- A5% (1)
- B80% (16)
- C5% (1)
- D10% (2)
Why each option
The `getfacl` output details specific permissions for the file `afile`, including those for a named user and a named group, which are then evaluated against the ACL mask.
The owning group 'support' is granted only 'r' (read) permission by `group::r`, and the `mask::rwx` does not add execute permission for the owning group.
The entry `user:hugh:rw` explicitly grants read and write permissions to the user hugh, and since the `mask::rwx` entry does not restrict read access, hugh retains the read permission.
The `getfacl` output does not contain any specific entry for a generic 'users' group, only for the owning group 'support' and the named group 'staff'.
The owner 'matt' has `rwx` permissions as indicated by `user::rwx`, which includes write access, allowing them to edit the file.
The entry `group:staff:rx` explicitly grants read and execute permissions to members of the staff group, and because the `mask::rwx` entry does not restrict these, members of the staff group retain both read and execute permissions.
Concept tested: Linux ACL interpretation and effective permissions
Source: https://www.redhat.com/sysadmin/linux-access-control-lists
Topics
Community Discussion
No community discussion yet for this question.