xref: /linux/Documentation/filesystems/ntfs.rst (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1.. SPDX-License-Identifier: GPL-2.0
2
3=================================
4The Linux NTFS filesystem driver
5=================================
6
7
8.. Table of contents
9
10   - Overview
11   - Utilities support
12   - Supported mount options
13
14
15Overview
16========
17
18NTFS is a Linux kernel filesystem driver that provides full read and write
19support for NTFS volumes. It is designed for high performance, modern
20kernel infrastructure (iomap, folio), and stable long-term maintenance.
21
22
23Utilities support
24=================
25
26The NTFS utilities project, called ntfsprogs-plus, provides mkfs.ntfs,
27fsck.ntfs, and other related tools (e.g., ntfsinfo, ntfsclone, etc.) for
28creating, checking, and managing NTFS volumes. These utilities can be used
29for filesystem testing with xfstests as well as for recovering corrupted
30NTFS devices.
31
32The project is available at:
33
34  https://github.com/ntfsprogs-plus/ntfsprogs-plus
35
36
37Supported mount options
38=======================
39
40The NTFS driver supports the following mount options:
41
42======================= ====================================================
43iocharset=name          Character set to use for converting between
44                        the encoding is used for user visible filename and
45                        16 bit Unicode characters.
46
47nls=name                Deprecated option.  Still supported but please use
48                        iocharset=name in the future.
49
50uid=
51gid=
52umask=                  Provide default owner, group, and access mode mask.
53                        These options work as documented in mount(8).  By
54                        default, the files/directories are owned by root
55                        and he/she has read and write permissions, as well
56                        as browse permission for directories.  No one else
57                        has any access permissions.  I.e. the mode on all
58                        files is by default rw------- and
59                        for directories rwx------, a consequence of
60                        the default fmask=0177 and dmask=0077.
61                        Using a umask of zero will grant all permissions to
62                        everyone, i.e. all files and directories will have
63                        mode rwxrwxrwx.
64
65fmask=
66dmask=                  Instead of specifying umask which applies both to
67                        files and directories, fmask applies only to files
68                        and dmask only to directories.
69
70showmeta=<BOOL>
71show_sys_files=<BOOL>   If show_sys_files is specified, show the system
72                        files in directory listings.  Otherwise the default
73                        behaviour is to hide the system files.
74                        Note that even when show_sys_files is specified,
75                        "$MFT" will not be visible due to bugs/mis-features
76                        in glibc. Further, note that irrespective of
77                        show_sys_files, all files are accessible by name,
78                        i.e. you can always do "ls -l \$UpCase" for example
79                        to specifically show the system file containing
80                        the Unicode upcase table.
81
82case_sensitive=<BOOL>   If case_sensitive is specified, treat all filenames
83                        as case sensitive and create file names in
84                        the POSIX namespace (default behavior). Note,
85                        the Linux NTFS driver will never create short
86                        filenames and will remove them on rename/delete of
87                        the corresponding long file name. Note that files
88                        remain accessible via their short file name, if it
89                        exists.
90
91nocase=<BOOL>           If nocase is specified, treat filenames
92                        case-insensitively.
93
94disable_sparse=<BOOL>   If disable_sparse is specified, creation of sparse
95                        regions, i.e. holes, inside files is disabled for
96                        the volume (for the duration of this mount only).
97                        By default, creation of sparse regions is enabled,
98                        which is consistent with the behaviour of
99                        traditional Unix filesystems.
100
101errors=opt              Specify NTFS behavior on critical errors: panic,
102                        remount the partition in read-only mode or
103                        continue without doing anything (default behavior).
104
105mft_zone_multiplier=    Set the MFT zone multiplier for the volume (this
106                        setting is not persistent across mounts and can be
107                        changed from mount to mount but cannot be changed
108                        on remount).  Values of 1 to 4 are allowed, 1 being
109                        the default.  The MFT zone multiplier determines
110                        how much space is reserved for the MFT on the
111                        volume.  If all other space is used up, then the
112                        MFT zone will be shrunk dynamically, so this has no
113                        impact on the amount of free space.  However, it
114                        can have an impact on performance by affecting
115                        fragmentation of the MFT. In general use the
116                        default.  If you have a lot of small files then use
117                        a higher value.  The values have the following
118                        meaning:
119
120                        =====   =================================
121                        Value   MFT zone size (% of volume size)
122                        =====   =================================
123                          1             12.5%
124                          2             25%
125                          3             37.5%
126                          4             50%
127                        =====   =================================
128
129                        Note this option is irrelevant for read-only mount.
130
131preallocated_size=      Set preallocated size to optimize runlist merge
132                        overhead with small chunck size.(64KB size by
133                        default)
134
135acl=<BOOL>              Enable POSIX ACL support. When specified, POSIX
136                        ACLs stored in extended attributes are enforced.
137                        Default is off. Requires kernel config
138                        NTFS_FS_POSIX_ACL enabled.
139
140sys_immutable=<BOOL>    Make NTFS system files (e.g. $MFT, $LogFile,
141                        $Bitmap, $UpCase, etc.) immutable to user initiated
142                        modifications for extra safety. Default is off.
143
144nohidden=<BOOL>         Hide files and directories marked with the Windows
145                        "hidden" attribute. By default hidden items are
146                        shown.
147
148hide_dot_files=<BOOL>   Hide names beginning with a dot ("."). By default
149                        dot files are shown. When enabled, files and
150                        directories created with a leading '.' will be
151                        hidden from directory listings.
152
153windows_names=<BOOL>    Refuse creation/rename of files with characters or
154                        reserved device names disallowed on Windows (e.g.
155                        CON, NUL, AUX, COM1, LPT1, etc.). Default is off.
156discard=<BOOL>          Issue block device discard for clusters freed on
157                        file deletion/truncation to inform underlying
158                        storage.
159======================= ====================================================
160