LX0-104 · 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.. This question examines true statements about the characteristics and usage of Linux Extended Attributes on files.
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
(19 responses)- A89% (17)
- C5% (1)
- D5% (1)
Why each option
This question examines true statements about the characteristics and usage of Linux Extended Attributes on files.
Extended attribute values are byte strings, and an empty string (zero-length byte sequence) is a valid and acceptable value for an extended attribute.
Extended attributes consume disk space, as their names and values are stored as part of the file's metadata on the filesystem, and this storage is accounted for against disk quotas.
On modern Linux filesystems like ext4 and XFS, extended attributes are typically enabled by default and do not require a specific `attr` or `user_xattr` mount option to function.
Extended attributes are associated with the inode, not individual directory entries (files); therefore, hard-linked files, which share the same inode, will also share the same extended attributes.
SELinux and other kernel security modules extensively use extended attributes (specifically within the `security` or `system` namespaces) to store and manage security contexts and policies for files.
Concept tested: Linux Extended Attribute properties
Source: https://man7.org/linux/man-pages/man7/xattr.7.html
Topics
Community Discussion
No community discussion yet for this question.