LX0-104 · Question #359
You are certain that your kernel has been compiled with ACL support, however, when you try to set an ACL on a file, you get the following output: % setfacl m user:hugh:r afile.txt setfacl…
The correct answer is C. The partition has not been mounted with the acl option. Even with kernel ACL support, a partition must be explicitly mounted with the acl option in /etc/fstab or during manual mount to enable Access Control List functionality on that filesystem.
Question
Options
- AThere is an error in the command line parameters.
- BThere is no user on the system named hugh.
- CThe partition has not been mounted with the acl option.
- DThe file afile.txt doesn't exist.
How the community answered
(40 responses)- A3% (1)
- B5% (2)
- C85% (34)
- D8% (3)
Why each option
Even with kernel ACL support, a partition must be explicitly mounted with the `acl` option in `/etc/fstab` or during manual mount to enable Access Control List functionality on that filesystem.
The command `setfacl -m user:hugh:r afile.txt` is syntactically correct for setting an ACL.
If the user 'hugh' did not exist, the error message would typically be 'No such user', not 'Operation not supported'.
For ACLs to be functional on a filesystem, the partition must be mounted with the `acl` option, even if the kernel itself supports ACLs; otherwise, operations like `setfacl` will fail with 'Operation not supported'.
If 'afile.txt' did not exist, the error message would typically be 'No such file or directory', not 'Operation not supported'.
Concept tested: Filesystem ACL mount option
Source: https://man7.org/linux/man-pages/man5/fstab.5.html
Topics
Community Discussion
No community discussion yet for this question.