file systems which support tail‐merging). This is necessary for applications such
as LILO which read the file system directly, and which don’t understand tail‐merged files. Note: As of this writing, the ext2, ext3, and ext4 file systems do not support tail‐merging.
T A directory with the ’T’ attribute will be deemed to be the top of directory hierarchies for the purposes of the Orlov block allocator. This is a hint to the block allocator used by ext3 and ext4 that the sub‐
directories under this directory are not related, and thus should be spread apart for allocation purposes. For example it is a very good idea to set the ’T’ attribute on the /home directory, so that
/home/john and /home/mary are placed into separate block groups. For directories where this attribute is not set, the Orlov block allocator will try to group subdirectories closer together where possible.
u When a file with the ’u’ attribute set is deleted, its contents are saved. This allows the user to ask for its undeletion. Note: please make sure to read the bugs and limitations section at the end of this
document.
x A file with the ’x’ requests the use of direct access (dax) mode, if the kernel supports DAX. This can be overridden by the ’dax=never’ mount option. For more information see the kernel documentation for dax:
<https://www.kernel.org/doc/html/latest/filesystems/dax.html>.
If the attribute is set on an existing directory, it will be inherited by all files and subdirectories that are subsequently created in the directory. If an existing directory has contained some files and sub‐
directories, modifying the attribute on the parent directory doesn’t change the attributes on these files and subdirectories.
V A file with the ’V’ attribute set has fs‐verity enabled. It cannot be written to, and the file system will automatically verify all data read from it against a cryptographic hash that covers the entire file’s
contents, e.g. via a Merkle tree. This makes it possible to efficiently authenticate the file. This attribute may not be set or cleared using chattr(1), although it can be displayed by lsattr(1).
AUTHOR
chattr was written by Remy Card <Remy.Card@linux.org>. It is currently being maintained by Theodore Ts’o <tytso@alum.mit.edu>.
BUGS AND LIMITATIONS
The ’c’, ’s’, and ’u’ attributes are not honored by the ext2, ext3, and ext4 file systems as implemented in the current mainline Linux kernels. Setting ’a’ and ’i’ attributes will not affect the ability to write to
already existing file descriptors.
The ’j’ option is only useful for ext3 and ext4 file systems.
The ’D’ option is only useful on Linux kernel 2.5.19 and later.
AVAILABILITY
chattr is part of the e2fsprogs package and is available from http://e2fsprogs.sourceforge.net.
SEE ALSO
lsattr(1), btrfs(5), ext4(5), mkfs.f2fs(8), xfs(5).
E2fsprogs version 1.47.0 February 2023 CHATTR(1)