Write to NTFS-formated drives on Yosemite [duplicate]
I sometimes need to mount USB drives that are NTFS formatted and write to them. On Mavericks I achieved this using the Homebrew formula ntfs-3g
which depends on osxfuse
.
After upgrading to Yosemite, osxfuse
is broken. Homebrew message:
==> Upgrading osxfuse
osxfuse: OS X Mavericks or older is required for this package.
OS X Yosemite introduced a strict unsigned kext ban which breaks this package.
You should remove this package from your system and attempt to find upstream
binaries to use instead.
Error: An unsatisfied requirement failed this build.
I take this to mean that the kernel extension used by osxfuse
is completely disallowed in Yosemite because it is not digitally signed by Apple, whereas in Mavericks it was allowed.
So, is there any way now to mount and write to an NTFS-formatted USB drive in Yosemite using either open-source software or free, unencumbered (not spyware/malware or bundled with useless toolbars etc.) software from the App Store?
Open Terminal.
If you have brewed osxfuse installed, you have to uninstall it, because unsigned kexts are banned now. Type:
brew cask uninstall osxfuse
On the other hand, if you don't have Homebrew at all, download it:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Updating Homebrew is recommended.
brew update
If you don't have Homebrew Cask installed, type:
brew install caskroom/cask/brew-cask
Install a binary osxfuse
package from Homebrew Cask:
brew cask install osxfuse
Install ntfs-3g
:
brew install ntfs-3g
You need to create a symlink for mount_ntfs
, in order to make drives mount automatically:
sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.original
sudo ln -s /usr/local/sbin/mount_ntfs /sbin/mount_ntfs
If you are running OS X 10.11 and the commands above fail, try:
sudo nvram boot-args="rootless=0"
edit: This doesn't work for me in the final El Capitan (from Mac App Store). I had to disable SIP through recovery. Could someone confirm that this is indeed necessary?
... and reboot your machine. Then try symlinking mount_ntfs
again.
Thanks to bjorgvino.
Quickly mount a NTFS disk read/write on all recent OS X (including Yosemite, El Capitan):
- Open Application -> Utilities -> Terminal
- Type
mount
and look for the line with your disk. It will show something like:/dev/disk3s1 on /Volumes/MyDisk (ntfs, local, noowners, nobrowse)
-
Type the following in the Terminal, replacing
/dev/diskXsX
with your disk as shown in themount
command:sudo mkdir /Volumes/Mount
*Make sure that the device is not already mounted, if yes, please unmount it first. Otherwise it will result in error: mount_ntfs: /dev/diskNsN on /Volumes/Mount: Resource busy
sudo umount /Volumes/<device_name> sudo mount -o rw,auto,nobrowse -t ntfs /dev/diskXsX /Volumes/Mount/ open /Volumes/Mount/
To make this change permanent run the following (correct for El Capitan):
-
Run the following command, changing /dev/diskXsX to your disk:
export DEVICE=/dev/diskXsX echo UUID=`diskutil info $DEVICE | grep UUID | awk '{print $3}'` none ntfs rw,auto,nobrowse echo LABEL=NTFS none ntfs rw,auto,nobrowse
Run
sudo vifs
and paste in the output from the previous 2 lines. To do this pressdown
to go to the bottom of the file,A
to start adding text, paste in the 2 lines then pressescape
and:wq
to write the file. (vifs is the only safe way to edit the fstab in OS X).-
Run the following to mount the disk
sudo umount /Volumes/$DEVICE sudo diskutil mountDisk $DEVICE sudo open `mount | grep $DEVICE | awk '{print $3}'`
Note: The device will no longer automatically open a window when you attach it. To access it open a Finder window and select the Go
-> Go to Folder
to /Volumes
I normally use Paragon NTFS, but just tried this method with 10.10.1 and it seems to work after a rudimentary test [created a folder and copied few small files]
After disabling Paragon, a NTFS-formatted flash drive is not writeable:
I added that drive and the requisite flags to my fstab file:
Then unmounted and reinserted the flash drive. Note that it no longer shows up in the sidebar under Devices. You have to navigate to the /Volumes directory to find it. However, it is now writeable.
No third-party software required, but you do have to repeat this for every target NTFS volume.
Additionally, there is script that can set up everything automatically: http://sourceforge.net/projects/native-ntfs-osx/files/?source=navbar (just succeeded with it on OSX 10.5.5 Yosemite).
This answer is aimed at latest compatibility for OS X 10.11 El Capitan.
Install latest osxfuse (3.x.x) from https://github.com/osxfuse/osxfuse/releases or from Homebrew with
brew cask install osxfuse
.Install latest NTFS-3G (2015.3.14) from Homebrew (http://brew.sh/).
As follow:
brew install ntfs-3g
- Link NTFS-3G to boot after temporary disabling System Integrity Protection.
As follow:
[reboot by holding CMD+R to get in recovery mode]
csrutil disable
[reboot normally]
sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.original
sudo ln -s /usr/local/sbin/mount_ntfs /sbin/mount_ntfs
[reboot by holding CMD+R to get in recovery mode]
csrutil enable
[reboot normally]