10

I have in my /etc/fstab file this line in order to mount my Windows ntfs partition:

/dev/sdb1 /media/sdb1  ntfs rw,noauto,users,permissions 0 2

I've changed the owner using chown and set the permissions to 777 using chmod.

If I make an ls -lt it shows the owner and the permissions properly changed.

However I still don't have permissions for writing there, if I execute mkdir test it says:

mkdir: cannot create directory `test': Permission denied

Any suggestions?

UPDATE

I found the solution, these are the steps I followed:

  1. Type sudo blkid

  2. Get the UUID related to your ntfs partition.

  3. Change the /etc/fstab file adding this line:

    UUID="your UUID" /media/"any name" ntfs users,defaults 0 0

5
  • 1
    Have you tried chown -R username:username /media/sdb1? That'll give it read write acess.
    – dearN
    Oct 27, 2012 at 15:18
  • Yes, I've tried that, the ownership is properly set
    – rfc1484
    Oct 27, 2012 at 16:38
  • that is rather strange because I didn't need to cchange anything in my fstab. However, I'll take a look and post my fstab here.
    – dearN
    Oct 27, 2012 at 17:06
  • When I connected my external hard drive and checked my /etc/fstab I didn't see any entry for my external hard drive. Did you use this HDD in a mac previously? If so, you'll have to turn off journaling. If not, despite the fact that you might get a little frustrated by this answer, check to see if you made any sytanx error in chown -R username:username /media/sdb1.
    – dearN
    Oct 27, 2012 at 17:08
  • Do these work? Seems to be a similar problem to what you describe in these 3 links: 1 2 3
    – dearN
    Oct 27, 2012 at 17:13

1 Answer 1

16

You can specify owner of the partition using uid and gid options:

/dev/sdb1 /media/sdb1  ntfs rw,noauto,users,uid=1000,gid=1000,permissions 0 2

Note that uid and gid values are numeric. If you are not the only user of the box you can discover those values by id command.

4
  • 3
    Is this necessary? I didn't have to add these options to my fstab. All I had to do was to chown the contents of /media/myNTFShardrive
    – dearN
    Oct 27, 2012 at 20:15
  • @drN That is an option, but not a very good one.
    – Marcel
    May 16, 2016 at 1:50
  • 10
    what does permissions do?
    – dashesy
    Sep 29, 2016 at 20:21
  • This one worked for me. UUID=YOUR_UUID /data ntfs-3g auto,user,rw,permissions 0 0.
    – progonkpa
    Nov 3, 2021 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .