nerdexam
CompTIA

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.

Security

Question

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: afile.txt: Operation not supported What is the most likely reason for this problem?

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)
  • A
    3% (1)
  • B
    5% (2)
  • C
    85% (34)
  • D
    8% (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.

AThere is an error in the command line parameters.

The command `setfacl -m user:hugh:r afile.txt` is syntactically correct for setting an ACL.

BThere is no user on the system named hugh.

If the user 'hugh' did not exist, the error message would typically be 'No such user', not 'Operation not supported'.

CThe partition has not been mounted with the acl option.Correct

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'.

DThe file afile.txt doesn't exist.

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

#ACLs#Filesystem permissions#Mount options#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice