Skip to content

NTFS 3G

Harshal Sheth edited this page Mar 24, 2016 · 17 revisions

NTFS-3G

NTFS-3G is an open source cross-platform implementation of the Microsoft Windows NTFS file system with read-write support.

Please note that NTFS-3G and FUSE for OS X are independent projects. Should you run into NTFS-3G related issues please post the issues on the NTFS-3G support forum at http://tuxera.com/forum/viewforum.php?f=7.

Installation

The following instructions assume that you know how to use Terminal. Doing this the wrong way could damage your operating system.

Download and install the latest release of FUSE for OS X from http://osxfuse.github.io. You will need at least version 3.0.

If you don't have it yet, install the package manager "Homebrew" as described on http://brew.sh.

Install NTFS-3G from Homebrew by opening a Terminal and entering the following command.

brew install homebrew/fuse/ntfs-3g

After installing NTFS-3G you can manually mount NTFS volumes in read-write mode by executing the following commands in Terminal. Replace /dev/disk1s1 with the actual NTFS partition you want to mount. You can find the partition name using diskutil list.

sudo mkdir /Volumes/NTFS
sudo /usr/local/bin/ntfs-3g /dev/disk1s1 /Volumes/NTFS -olocal -oallow_other

Auto-mount NTFS volumes in read-write mode

Even though you have installed NFTS-3G, newly connected NTFS volumes will still be auto-mounted in read-only mode. To change this you need to replace Apple's NTFS mount tool /sbin/mount_ntfs with the one provided by NTFS-3G.

It is important that you understand the security implications of what you are about to do. The mount tool is executed with root permissions. This means that NTFS-3G's mount tool will be executed with root permissions, too. Due to the way Homebrew installs software packages, NTFS-3G's mount tool is not protected from being tampered with by unprivileged attackers, essentially giving those attackers root access to your Mac. This is a major security risk. You have been warned.


Note:

On OS X El Capitan files in the /sbin directory are protected from being tampered with by a new security feature called System Integrity Protection (SIP). SIP does not protect you against the security thread outlined above.

To replace /sbin/mount_ntfs with the version provided by NTFS-3G you will need to reboot your Mac in recovery mode before proceeding. See https://support.apple.com/en-us/HT201314 for details on how to start the recovery system.

Once in recovery mode open a new Terminal window from the Utilities menu.


To replace Apple's NTFS mount tool with the one provided by NTFS-3G execute the following commands in Terminal. This will back up the original mount tool to /Volumes/Macintosh HD/sbin/mount_ntfs.orig.

sudo mv "/Volumes/Macintosh HD/sbin/mount_ntfs" "/Volumes/Macintosh HD/sbin/mount_ntfs.orig"
sudo ln -s /usr/local/sbin/mount_ntfs "/Volumes/Macintosh HD/sbin/mount_ntfs"

Uninstallation

To uninstall NTFS-3G, open a Terminal prompt and enter the following:

brew uninstall ntfs-3g

If you have replaced Apple's NTFS mount tool /sbin/mount_ntfs with the one provided by NTFS-3G to auto-mount NTFS volumes in read-write mode you will need to restore the original mount tool.


Note:

On OS X El Capitan files in the /sbin directory are protected from being tampered with by a new security feature called System Integrity Protection (SIP). You will need to reboot your Mac in recovery mode before proceeding. See above for details.

Once in recovery mode open a new Terminal window from the Utilities menu.


To restore Apple's NTFS mount tool execute the following command in Terminal.

sudo mv "/Volumes/Macintosh HD/sbin/mount_ntfs.orig" "/Volumes/Macintosh HD/sbin/mount_ntfs"

Frequently Asked Questions

1. Why is NTFS-3G's write performance so poor?

The ntfs-3g program opens and does I/O to the block device /dev/disk[number] of the NTFS volume in question. OS X does not have a VM buffer cache for block devices when they are accessed in this way. That is the most overwhelming factor, because both metadata operations and file data I/O boil down to read-writes by NTFS-3G to the block device.

Suppose we somehow automagically provided unified buffer caching for block devices by essentially making a disk look like a giant file. Even then, OS X and its buffer cache is really happy only when you do I/O that is in units of page size (4KB) and aligned on a page boundary. To get the most out of the I/O subsystem in OS X, ntfs-3g (or any other program for that matter) would really want to do I/O in multiples of 4KB.

For comparison, you should try writing to an NTFS disk image. You will see that it is considerably faster because you do have some caching in that case.

2. After installing NTFS-3G, my Boot Camp volume stopped showing up in the "Startup Disk" preference pane. Is reinstalling OS X, Boot Camp, and Windows the only recourse?

Relax. The "Startup Disk" preference pane is simply filtering out (that is, not displaying) any mounted volumes that it does not consider bootable. Its definition of a Boot Camp volume includes that the mounted volume either be of type msdos or ntfs - this is hardcoded into the preference pane plugin. This does not mean your Boot Camp volume has become unbootable. It is merely not showing up in the graphical user interface. You can hold the "opt" key during startup and choose the Windows partition to boot from. You can also remount it (read-only) using the NTFS file system built into OS X and it should start showing up in "Startup Disk".

Something went wrong with that request. Please try again.