62 NT File System

Kernel 2.2.12 and beyond support read only access to NTFS, the file system of MS/Windows/NT. The kernel needs to be configured to use it:

CONFIG_NTFS_FS=m

I have two NTFS partitions on the MS/Windows/NT side of the machine. So I edit /etc/fstab to include these two lines:

/dev/hda1       /nt/c          ntfs  defaults,user,ro,umask=002,gid=100 0 0
/dev/hda2       /nt/d          ntfs  defaults,user,ro,umask=002,gid=100 0 0

The various options mean: ro' mounts the file system as read-only;user’ lets any user mount the file-system; `nohide’ shows hidden and associated files; ‘noexec’ avoids regular files showing up as non-executable.

Then create directories for the mount points:

# mkdir /nt/c
# mkdir /nt/d

As any user can then mount the drives:

# mount /nt/c
# mount /nt/d

These will be mounted each time you reboot, unless you add the noauto' option to the appropriate lines in/etc/fstab`.

Users are granted access to and through the use of the umask=002,gid=100 in the /etc/fstab, and then add trusted users to this group. You can allow access for only a specific user by adding “uid=1000,gid=1000” to the options. Or you can remove all security and give complete access to everyone with umask=000 (this is dangerous as any login will be able to peruse your possibly private and password containing files on the NTFS partition).

Note that permissions on the mountpoint itself ( are irrelevant: when you mount a filesystem the permissions of the mounted filesystem’s root directory replace the permissions of the mountpoint, even when the filesystem in question does not support permissions.

If you need to transfer files from your linux partition to your NTFS partition then Explore2fs is an option. Have a look at http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0