Contribute
Register

<< Solved >> Writing to NTFS Formatted partitions, USBs and Drives - MacOS Catalina

Status
Not open for further replies.
Joined
Jun 6, 2014
Messages
52
Motherboard
Asus P8 Z68 V PRO
CPU
i5
Graphics
RX480
Mobile Phone
  1. iOS
Based on my experience to get this working on my own system, I thought that this might be beneficial for someone else.

Here is the blog article - https://julxrp.wordpress.com/2019/10/05/how-to-write-to-ntfs-partitions-on-your-mac-completely-free/

This solution will give you Mac the ability to read and write to NTFS as if it was a native partition. Most of the steps that you will see below comes from this link for reference.
https://trac.macports.org/wiki/howto/Ntfs3gFinder


Installation:

Step 1 - Install Xcode and terminal tools:

Install Xcode from the app store. Once installed open the app and Click agree to the licensing agreement.
After that, you need to open the Terminal app. And type the following command.
xcode-select --install
Then this window will open..

Click "Install" and wait for it to finish.

Step 2. - Install MacPorts:
Download and install MacPorts.


Step 3 - Install Fuse and NTFS-3g:
Download and install FUSE from this link.
https://osxfuse.github.io
If you are using MacOS 10.15 Catalina and newer, you should do this after installing FUSE.
Open the Terminal and type in the following command. (Copy and Paste is better)
sudo ln -s /usr/local/lib/pkgconfig/fuse.pc /opt/local/lib/pkgconfig/fuse.pc
If you don't put in the above line, MacOS and Macports would not detect that you have FUSE installed and will try to add in its own package. You don't want that.
Once Fuse is installed, Launch the Terminal app again type the following command.
sudo port install ntfs-3g
Step 4 - Make MacOS use NTFS-3G by default:
To do this you will need to modify the 'mount_ntfs' file.
Note: If you are using El Capitan, then you will need to disable 'SIP or System Integrity Protection'. To do this use the info in this link - SIP (how to)
**If you are using MacOS 10.15 Catalina, you will not need to disable SIP, but you will need to make the root system 'writeable' using the following command.
sudo mount -uw /
The reason for this is from Catalina onwards, the MacOS will mount to root system as 'read-only'. The above command will make the system 'writeable' only for this instance. Once you restart the Mac, it will go back to 'read-only'.
Open Terminal and Type in the following commands and note their results. One at a time.
id -u
id - g
You should get 501 and 20.
If you get different numbers, please make note of them. You will need it.
Then type the following commands one at time: ( You can copy and paste. One line at a time)
sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.orig
sudo touch /sbin/mount_ntfs
sudo chmod 0755 /sbin/mount_ntfs
sudo chown 0:0 /sbin/mount_ntfs
Now type in the following command
sudo nano /sbin/mount_ntfs
Now copy and paste the following text into the terminal window and then save it by pressing "Ctrl-X" and then "Y".
*This script assumes that MacPorts and ntfs-3g are installed in the default locations (/opt/local)
#!/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

/opt/local/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/ntfsmnt.log

exit $?;

Note: If you got different numbers for the 'id' commands, replace the numbers in line 4 & 5 of the above script with the numbers you got.
Otherwise, the script should work as is.

There you go. You now have NTFS working on your Mac and every NTFS formatted USB will mounted with write privileges.
 
Thanks this worked for me,
 
“LABEL=NAME none ntfs rw,auto,nobrowse”
This is working for me right now, is it good or the above process is good?
 
Status
Not open for further replies.
Back
Top