1.\" $NetBSD: mount_ntfs.8,v 1.11 2002/10/01 13:40:41 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 volume. 97Default is $DATA. 98.Sq ATTRNAME 99is an attribute name. 100Default is none. 101.Pp 102.Sy Examples : 103.Pp 104To get volume name (in Unicode): 105.Bd -literal -offset indent 106# cat /mnt/\\$Volume:\\$VOLUME_NAME 107.Ed 108.Pp 109To read directory raw data: 110.Bd -literal -offset indent 111# cat /mnt/foodir:\\$INDEX_ROOT:\\$I30 112.Ed 113.Ss Limited support for writing 114There is limited writing ability for files. 115Limitations: 116.Bl -bullet -compact 117.It 118file must be nonresident 119.It 120file must 121.Em not 122contain any holes (uninitialized areas) 123.It 124file can't be compressed 125.El 126.Pp 127Note that that it's not currently possible to create or remove files 128on NTFS filesystem. 129.Pp 130.Sy Warning : 131do not mount NTFS filesystems read-write. 132The write support is not very useful and is not tested well. 133It's not safe to write to any file on NTFS, you might damage the filesystem. 134Unless you want to debug NTFS filesystem code, mount the NTFS filesystem 135read-only. 136.Sh SEE ALSO 137.Xr mount 2 , 138.Xr unmount 2 , 139.Xr fstab 5 , 140.Xr disklabel 8 , 141.Xr mbrlabel 8 , 142.Xr mount 8 143.Sh HISTORY 144Support for NTFS first appeared in 145.Fx 3.0 . 146It has been ported to 147.Nx 148and first appeared in 149.Nx 1.5 . 150.Sh AUTHORS 151NTFS kernel implementation, 152.Nm 153and this manual were originally written by 154.An Semen Ustimenko Aq semenu@FreeBSD.org . 155.Pp 156The 157.Nx 158port was done by 159.An Christos Zoulas Aq christos@NetBSD.org 160and 161.An Jaromir Dolecek Aq jdolecek@NetBSD.org . 162.Sh BUGS 163The write support should be enhanced to actually be able change 164file size, and to create and remove files and directories. 165It's not very useful right now. 166.Pp 167If the attempt to mount NTFS gives you error like this: 168.Bd -literal 169# mount -t ntfs /dev/wd0k /mnt 170mount_ntfs: /dev/wd0k on /mnt: Invalid argument 171.Ed 172.Pp 173make sure that appropriate partition has correct entry in the 174disk label, particularily that the partition offset is correct. 175If the NTFS partition is the first partition on the fisk, the 176offset should be '63' on i386 (see 177.Xr disklabel 8 ) . 178.Xr mbrlabel 8 179could help you to setup the disk label correctly. 180.Pp 181If you mark the NTFS partition as 182.Ql dynamic 183under Microsoft Windows XP, 184it won't be possible to access it under 185.Nx 186anymore. 187