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

rfc1484
  • 693
  • 1
    Have you tried chown -R username:username /media/sdb1? That'll give it read write acess. – dearN Oct 27 '12 at 15:18
  • Yes, I've tried that, the ownership is properly set – rfc1484 Oct 27 '12 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 '12 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 '12 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 '12 at 17:13

1 Answers1

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.

Sergey
  • 1,181