LFCS · Question #367
Which of the following statements are true about Linux Extended Attributes on files? (Select TWO correct answers)
The correct answer is A. An attribute value may be empty. B. Attribute storage counts toward disk quota use. Linux Extended Attributes allow for flexible storage of file metadata, where attribute values can be empty and the attribute data contributes to disk space usage.
Question
Options
- AAn attribute value may be empty.
- BAttribute storage counts toward disk quota use.
- CAttribute use is enabled by mounting a partition with the attr option.
- DAn attribute is file, not inode, specific. Thus, a hard linked file in two locations could have different attributes.
- EAttributes are not used by SELinux and other kernel security modules.
How the community answered
(37 responses)- A89% (33)
- C3% (1)
- D3% (1)
- E5% (2)
Why each option
Linux Extended Attributes allow for flexible storage of file metadata, where attribute values can be empty and the attribute data contributes to disk space usage.
Extended attributes in Linux allow for empty values, meaning an attribute can exist without any associated data.
The data stored within extended attributes consumes space on the filesystem, typically on the inode or in an external block, and is therefore accounted for in disk quota calculations.
Most modern Linux filesystems (e.g., ext4, XFS) enable extended attribute support by default, so explicitly mounting with an `attr` option is generally not required.
Extended attributes are stored with the file's inode; therefore, all hard links to the same file share the exact same set of extended attributes, not different ones.
SELinux and other kernel security modules extensively use extended attributes (specifically the `security` namespace) to store security contexts and access control information.
Concept tested: Linux Extended Attributes properties
Source: https://www.kernel.org/doc/html/latest/filesystems/xattr.html
Topics
Community Discussion
No community discussion yet for this question.