CHATTR(1)

NAME
chattr - Change file attributes

SYNOPSIS

chattr [-RVf] [{+ | - | =} MODE...] [FILE...]

chattr -H | -v

OPTIONS

      -R, --recursive     recursively apply the changes to directories and
                          their contents
      -V, --verbose       Be verbose during operation
      -f, --force         suppress error messages
      -H, --help          this help text
      -v, --version       display the program version

DESCRIPTION

The chattr program allows to change file attributes, namely DOS attributes, as well as making files sparse, encrypt or compress them on FS level, or setting directories' case sensitivity.

The format of 'mode' is {+-=}[acCehnprsStu]

The operator '+' causes the selected attributes to be added to the existing attributes of the files; '-' causes them to be removed; and '=' causes them to be the only attributes that the files have. A single '=' causes all attributes to be removed.

Supported attributes:

      'r', 'Readonly':      file is read-only
      'h', 'Hidden':        file or directory is hidden
      's', 'System':        file or directory that the operating system uses
      'a', 'Archive':       file or directory has the archive marker set
      't', 'Temporary':     file is being used for temporary storage
      'S', 'Sparse':        file is sparse
      'c', 'Compressed':    file or directory is compressed
      'n', 'Notindexed':    file or directory is not to be indexed by the
    			content indexing service
      'e', 'Encrypted':     file is encrypted
      'p', 'Pinned':        file is pinned
      'u', 'Unpinned':      file is unpinned
      'C', 'Casesensitive': directory is handled case sensitive

CASE-SENSITIVE DIRECTORIES

Case-sensitive directories are supported starting with Windows 10 1803. They are only supported on local NTFS filesystems.

The system-wide availability of case-sensitive directories depends on the setting of the registry value of type DWORD called HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsEnableDirCaseSensitivity. The value 0 disables case-sensitive directories. The value 1 enables case-sensitive directories. The value 3 enables case-sensitive directories, too, with the additional requirement that a directory can only be set to case-sensitive if it's empty. No other value is supported.

Removing case-sensitivity on a directory requires that the directory does not contain files only differing by case.

Trying to access a case-sensitive directory on a remote NTFS leads to all kinds of weird errors and is therefore not recommended.

COPYRIGHT

Copyright © Cygwin authors

Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.