Make NTFS writable again (on OSX)
Tags: ntfs, mac, osx
Published: 2021-07-02 16:08:24

Long story short: [NTFS](https://en.wikipedia.org/wiki/NTFS) is a proprietary filesystem, owned by Microsoft. And thanks to this, all the NTFS formatted hard drives are read-only on a OSX OS.

Following you can find instructions on how to make NTFS writable again, depending on your operating system.


<!-- TOC -->
  * [Ventura (13.0.1)](#ventura--1301-)
  * [Monterey (12.2.1)](#monterey--1221-)
  * [Mojave (10.14.6)](#mojave--10146-)
  * [Yosemite (10.10) and El Capitain (10.11)](#yosemite--1010--and-el-capitain--1011-)
  * [Useful links](#useful-links)
  * [Thanks to](#thanks-to)
<!-- TOC -->


## Ventura (13.0.1)
Good news everyone!
It is now possible to re-enable the NTFS writing.

No more talk (really, the Italian "bando alla ciance" is way better).

**Step 0:** [Homebrew](https://brew.sh/) should be installed.

**Step 1:** Update Xcode via Terminal:
```shell
$ xcode-select --install
```

**Step 2:** Install osxfuse via Homebrew
```shell
$ brew install --cask osxfuse
```

**Step 3:** Install NTFS-3G from Homebrew
```shell
brew tap gromgit/homebrew-fuse
brew install ntfs-3g-mac
```

**Step 4:** Change the mount location for your drive

First list all the mounted drives:
```shell
diskutil list
```

Take note of the name of the drive you want to make readable. In our example we'll use `disk2s2`:
![diskutil example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uc9t70utyq2302pqd70i.png)

Unmount the drive:
```shell
sudo diskutil unmount /dev/disk2s2
```

Create a new volume directory:
```shell
sudo mkdir /Volumes/NTFSDrive
```

Mount your drive to new newly created folder:
```shell
sudo /usr/local/sbin/mount_ntfs /dev/disk2s2 /Volumes/NTFSDrive
```

Open the drive:
```shell
open /Volumes/NTFSDrive/
```


## Monterey (12.2.1)
Due to several security changes introduced in the previous versions (Big Sur or maybe Catalina), the operations described in this post no longer work.
I'll update this section as soon as I'll discover a working workaround.

## Mojave (10.14.6)
**Step 0:** [Homebrew](https://brew.sh/) should be installed.

**Step 1:** Update Xcode via Terminal:
```shell
$ xcode-select --install
```

**Step 2:** Disable the System Integrity Protection (SIP).
Reboot your Mac, and when the boot screen appears (the one with the Apple logo), press CMD+R, and go into recovery mode.
Once here, open the terminal from the menu' bar and execute the following command.

```shell
$ csrutil disable
```

If the operation is successful, reboot the machine.

**Step 3:** Install osxfuse via Homebrew
```
$ brew install --cask osxfuse
```

Reboot.

**Step 4:** Install ntfs-3g
The [original Homebrew formulae](https://formulae.brew.sh/formula/ntfs-3g#default) has been disabled since it was not open-source software (you can find the entire motivation in the links at the end of the page).

You can use [a fork made by an user](https://github.com/darelover/homebrew-ntfs-3g):
```shell
brew install darelover/ntfs-3g/ntfs-3g
```

Guess what? Reboot again.

**Step 5:** Mount point
First, backup the original mount file:
```shell
$ sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.orig
```

Now, create the new mount file:
```shell
sudo ln -s /usr/local/sbin/mount_ntfs /sbin/mount_ntfs
```

Note: `/usr/local/sbin/mount_ntfs` should be a symbolic link to the folder created by ntfs-3g. Usually its path should be `/usr/local/Cellar/ntfs-3g/<version_number>/sbin`

**Step 6:** Check
Attach your hard drive. If you're lucky, everything should be working fine.

But you can notice that in the Finder the files are not visible, you can see only folders (via Terminal you should see the entire filesystem correctly).

If you are unlucky, follow this step.
Using the Terminal, go in the ntfs-3g folder, make a backup of the `mount_ntfs file` and create a new one:
```shell
$ cd /usr/local/Cellar/ntfs-3g/<version_number>/sbin
$ sudo mv mount_ntfs mount_ntfs.orig
$ sudo nano mount_ntfs
```

Copy the following script in the new file you've just created:
```
#!/bin/bash
VOLUME_NAME="${@:$#}"
VOLUME_NAME=${VOLUME_NAME#/Volumes/}
USER_ID=501
GROUP_ID=20
TIMEOUT=20
if [ `/usr/bin/stat -f "%u" /dev/console` -eq 0 ]; then
        USERNAME=`/usr/bin/defaults read /Library/Preferences/com.apple.loginwindow | /usr/bin/grep autoLoginUser | /usr/bin/awk '{ print $3 }' | /usr/bin/sed 's/;//'`
        if [ "$USERNAME" = "" ]; then
                until [ `stat -f "%u" /dev/console` -ne 0 ] || [ $TIMEOUT -eq 0 ]; do
                        sleep 1
                        let TIMEOUT--
                done
                if [ $TIMEOUT -ne 0 ]; then
                        USER_ID=`/usr/bin/stat -f "%u" /dev/console`
                        GROUP_ID=`/usr/bin/stat -f "%g" /dev/console`
                fi
        else
                USER_ID=`/usr/bin/id -u $USERNAME`
                GROUP_ID=`/usr/bin/id -g $USERNAME`
        fi
else
        USER_ID=`/usr/bin/stat -f "%u" /dev/console`
        GROUP_ID=`/usr/bin/stat -f "%g" /dev/console`
fi

/usr/local/opt/ntfs-3g/bin/ntfs-3g \
         -o volname="${VOLUME_NAME}" \
         -o local \
         -o negative_vncache \
         -o auto_xattr \
         -o auto_cache \
         -o noatime \
         -o windows_names \
         -o user_xattr \
         -o inherit \
         -o uid=$USER_ID \
         -o gid=$GROUP_ID \
         -o allow_other \
         "$@" &> /var/log/mount-ntfs-3g.log

exit $?;
```

Save the file, save the world.

Change the file's permissions:
```
$ sudo chmod 555 mount_ntfs
```

Remove and then reconnect your disk, et-voila'!.

## Yosemite (10.10) and El Capitain (10.11)
**Step 0 - ONLY FOR EL CAPITAIN:** Disable the System Integrity Protection (SIP).

 Reboot your Mac, and when the boot screen appears (the one with the Apple logo), press `CMD+R`, and go into recovery mode.
Once here, open the terminal from the menù bar and execute the following command.

```shell
$ csrutil disable
```

If the operation is successful, reboot the machine.

**Step 1:** Install osxfuse

Download osxfuse and install it. Flag all the provided options when requested.
Once the installation is finished, reboot the machine.

**Step 2:** Install ntfs-3g

Download and install ntfs-3g. Unfortunately this application is no longer maintained, but this version is still enough for our purposes.
When asked, check the option _nocaching_.

**On El Capitain an error message could be displayed at the end of the installation process. Just ignore it.**

Reboot the system.

**Step 3:** Download and install fuse-wait.

**Step 4:** Attach your hard drive and check that the disk is writable.

**Step 5 - ONLY FOR EL CAPITAIN:** Re-enable the SIP
Repeat the step 1, but now execute this command:

```shell
$ csrutil enable
```

If the operation is successful, reboot the machine.

## Useful links
Homebrew: https://brew.sh/
ntfs-3g original formulae: https://formulae.brew.sh/formula/ntfs-3g#default
Why ntfs-3g formulae has been disabled: https://github.com/Homebrew/homebrew-core/pull/64491

## Thanks to
https://wpbeaches.com/how-to-write-to-windows-ntfs-usb-disk-drives-on-macos-macos-mojave-and-sierra/

https://gist.github.com/takeit/9fa83840f3b2065e204dc9d52cef3693

https://github.com/darelover/homebrew-ntfs-3g

https://github.com/osxfuse/osxfuse/issues/574

http://www.macbreaker.com/2014/06/how-to-enable-writing-to-ntfs-hard.html

https://techsviewer.com/how-to-write-ntfs-drives-on-macos-ventura/