1.\" $NetBSD: mount_ntfs.8,v 1.10 2001/11/16 11:59:47 wiz Exp $ 2.\" 3.\" Copyright (c) 1993,1994 Christopher G. Demetriou 4.\" Copyright (c) 1999 Semen Ustimenko 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. All advertising materials mentioning features or use of this software 16.\" must display the following acknowledgment: 17.\" This product includes software developed by Christopher G. Demetriou. 18.\" 3. The name of the author may not be used to endorse or promote products 19.\" derived from this software without specific prior written permission 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31.\" 32.\" Id: mount_ntfs.8,v 1.3 1999/05/04 11:34:33 jkoshy Exp 33.\" 34.Dd October 31, 2001 35.Dt MOUNT_NTFS 8 36.Os 37.Sh NAME 38.Nm mount_ntfs 39.Nd mount an NTFS file system 40.Sh SYNOPSIS 41.Nm mount_ntfs 42.Op Fl a 43.Op Fl i 44.Op Fl u Ar uid 45.Op Fl g Ar gid 46.Op Fl m Ar mask 47.Pa special 48.Pa node 49.Sh DESCRIPTION 50The 51.Nm 52command attaches the NTFS filesystem residing on the device 53.Pa special 54to the global filesystem namespace at the location 55indicated by 56.Pa node . 57This command is normally executed by 58.Xr mount 8 59at boot time, but can be used by any user to mount an 60NTFS file system on any directory that they own (provided, 61of course, that they have appropriate access to the device that 62contains the file system). 63.Pp 64The supported NTFS versions include both NTFS4, as used by Microsoft 65Windows NT 4.0, and NTFS5, as used by Microsoft Windows 2000 and XP. 66.Pp 67The options are as follows: 68.Bl -tag -width Ds 69.It Fl a 70Force behaviour to return MS-DOS 8.3 names also on 71.Fn readdir . 72.It Fl i 73Make name lookup case insensitive for all names except POSIX names. 74.It Fl u Ar uid 75Set the owner of the files in the file system to 76.Ar uid . 77The default owner is the owner of the directory 78on which the file system is being mounted. 79.It Fl g Ar gid 80Set the group of the files in the file system to 81.Ar gid . 82The default group is the group of the directory 83on which the file system is being mounted. 84.It Fl m Ar mask 85Specify the maximum file permissions for files 86in the file system. 87.El 88.Sh FEATURES 89.Ss NTFS file attributes 90NTFS file attributes can be accessed in following way: 91.Bd -literal -offset indent 92foo[[:ATTRTYPE]:ATTRNAME] 93.Ed 94.Pp 95.Sq ATTRTYPE 96is one of identifier listed in $AttrDef file of 97volume. Default is $DATA. 98.Sq ATTRNAME 99is an attribute name. Default is none. 100.Pp 101.Sy Examples : 102.Pp 103To get volume name (in Unicode): 104.Bd -literal -offset indent 105# cat /mnt/\\$Volume:\\$VOLUME_NAME 106.Ed 107.Pp 108To read directory raw data: 109.Bd -literal -offset indent 110# cat /mnt/foodir:\\$INDEX_ROOT:\\$I30 111.Ed 112.Ss Limited support for writing 113There is limited writing ability for files. Limitations: 114.Bl -bullet -compact 115.It 116file must be nonresident 117.It 118file must 119.Em not 120contain any holes (uninitialized areas) 121.It 122file can't be compressed 123.El 124.Pp 125Note that that it's not currently possible to create or remove files 126on NTFS filesystem. 127.Pp 128.Sy Warning : 129do not mount NTFS filesystems read-write. The write support is 130not very useful and is not tested well. It's not safe to write to any file 131on NTFS, you might damage the filesystem. 132Unless you want to debug NTFS filesystem code, mount the NTFS filesystem 133read-only. 134.Sh SEE ALSO 135.Xr mount 2 , 136.Xr unmount 2 , 137.Xr fstab 5 , 138.Xr disklabel 8 , 139.Xr mbrlabel 8 , 140.Xr mount 8 141.Sh HISTORY 142Support for NTFS first appeared in 143.Fx 3.0 . 144It has been ported to 145.Nx 146and first appeared in 147.Nx 1.5 . 148.Sh AUTHORS 149NTFS kernel implementation, 150.Nm 151and this manual were originally written by 152.An Semen Ustimenko Aq semenu@FreeBSD.org . 153.Pp 154The 155.Nx 156port was done by 157.An Christos Zoulas Aq christos@NetBSD.org 158and 159.An Jaromir Dolecek Aq jdolecek@NetBSD.org . 160.Sh BUGS 161The write support should be enhanced to actually be able change 162file size, and to create and remove files and directories. 163It's not very useful right now. 164.Pp 165If the attempt to mount NTFS gives you error like this: 166.Bd -literal 167# mount -t ntfs /dev/wd0k /mnt 168mount_ntfs: /dev/wd0k on /mnt: Invalid argument 169.Ed 170.Pp 171make sure that appropriate partition has correct entry in the 172disk label, particularily that the partition offset is correct. 173If the NTFS partition is the first partition on the fisk, the 174offset should be '63' on i386 (see 175.Xr disklabel 8 ) . 176.Xr mbrlabel 8 177could help you to setup the disk label correctly. 178.Pp 179If you mark the NTFS partition as 180.Ql dynamic 181under Microsoft Windows XP, 182it won't be possible to access it under 183.Nx 184anymore. 185