0

The chattr(1) manpage describes the x attribute as:

x      The  'x' attribute can be set on a directory or file.  If the attri‐
       bute is set on an existing directory, it will be  inherited  by  all
       files and subdirectories that are subsequently created in the direc‐
       tory.  If an existing directory has contained some files and  subdi‐
       rectories,  modifying  the attribute on the parent directory doesn't
       change the attributes on these files and subdirectories.

So this attribute is inherited by newly created files/subdirectories, but other than that, the manpage doesn't specify any effect. What is this attribute used for?

  • 1
    my man page for chattr says 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/lat‐ est/filesystems/dax.html>. – Jaromanda X Mar 23 '23 at 00:38
  • Yeah, just discovered that as well. – Evan Krall Mar 23 '23 at 00:39

1 Answers1

1

Looks like the version of e2fsprogs that comes with Ubuntu Jammy is missing some information in the manpage that's present in the latest version:

 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 subdirectories,
    modifying the attribute on the parent directory doesn't
    change the attributes on these files and subdirectories.

This was added in this commit, which was released in 1.46.6, the version after the Ubuntu package.