12

I have a 500GB SATA drive connected via a USB to my Pi 2. I can read data off it fine, but I can't write to it. It is formatted as NTFS. On my desktop, it is write-able, but not on Raspbian.

willem.hill
  • 231
  • 1
  • 2
  • 6

2 Answers2

17

Set ownership when you mount the drive. For example if your drive that you want to mount is /dev/sda1:

sudo mount -t ntfs-3g -o uid=pi,gid=pi /dev/sda1 /media/USBDRIVE/

or if later you want to change permissions of files on the drive after mount, try to add a line to /etc/fstab something like this:

/dev/sda1 /media/USBDRIVE ntfs-3g auto,users,permissions 0 0

Note that ntfs-3g is a built-in package in Raspbian Jessie (but Not Jessie Lite), if you are using older distribution you need to install it before mount (sudo apt-get install ntfs-3g). You can check easily that this package has already installed: dpkg -l | grep ntfs-3g

oroszkodik
  • 326
  • 2
  • 5
  • Raspbian doesn't have the ability to write to an NTFS drive by default. Software has to be installed to allow writing. – Jacobm001 Nov 29 '15 at 02:42
  • 2
    Since ntfs-3g package is a built-in package in Raspbian Jessie, it does have the ability! – oroszkodik Nov 29 '15 at 10:09
  • I stand corrected. My apologies for the down vote... As it stands I can't change it, due to the time since voting. Could you edit your answer to include the information that Jessie comes with the package? I'll change my down vote to an upvote. – Jacobm001 Nov 29 '15 at 20:46
  • Of course. Forgot to mention this info (because I am using Jessie :)). Thanks! – oroszkodik Nov 29 '15 at 21:52
  • Vote changed to a +1. Thanks for the contribution :) – Jacobm001 Nov 29 '15 at 21:53
  • @oroszkodik Thanks! This is exactly what I needed to know! – willem.hill Nov 30 '15 at 02:02
4

I just wanted to share my experience on using the current version of ntfs-3g installed with apt-get install ntfs-3g (version 1:2014.2.15AR.2-1+deb8u2). I was getting "Input/output error" using that version. It seems to be a known error: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774330.

You can downgrade the ntfs-3g version from the 2014 release to the 2012 release but I decided to run the latest release. So, I did apt-get remove ntfs-3g and then I built the 2016 release from source using the oficial docs: http://www.tuxera.com/community/open-source-ntfs-3g/

tl;dr

  1. Download the stable source release (in my cases 2016.2.22)
  2. Run ./configure
  3. make
  4. sudo make install
  5. Restart
  6. Done. You can use it like mount -t ntfs-3g /dev/sda1 /mnt/windows