Cannot edit /etc/fstab to let NTFS drives write

I have Mac Os X 10.9 Mavericks. I want to write to NTFS drives. I followed the instructions here.

The following command was not allowed to run:

$ sudo echo "UUID=7575C85E-F6F7-4ABD-B7FB-6180B795DD81 none ntfs rw,auto,nobrowse" >> /etc/fstab
-bash: /etc/fstab: Permission denied

What should I do to edit /etc/fstab?


You need sudo to perform the write to /etc/fstab and not the echo. Try:

echo "xyz" | sudo tee -a /etc/fstab > /dev/null

I added the > /dev/null to suppress the echoing of the long UUID (which I abbreviated "xyz" for clarity's sake). You can skip the > /dev/null part and it will function the same as the command you listed.

echo "UUID=7575C85E-F6F7-4ABD-B7FB-6180B795DD81 none ntfs rw,auto,nobrowse" | sudo tee -a /etc/fstab

....


You could use an editor under sudo

e.g. for nano

sudo nano /etc/fstab

Then copy the line from somewhere to the clipboard and then use paste to paste into the edit session. Then save.


In OSX 10.9 the file /etc/fstab does not exist, so I just create that file and works perfectly.

Just don't be confused (like me) with a file called /etc/fstab.hd.