3

I have a folder /media/user/drive_name that is set in fstab to automount an NTFS drive /dev/sdc2 /media/user/drive_name ntfs auto

The problem is that when the drive is mounted, it and all of it's contents still owned by root. Even if I try to chown it or anything inside, it still remains under root.

When I unmount, it goes back to being owned by my user. Even if I mount it from nautilus under my user, it still becomes owned as root.

I want the folders inside to be owned by me. How can I do it?

1 Answer 1

0

If you give the command apropos ntfs you will find there's a man page man mount.ntfs describing the command and driver which will be used when you mount a filesystem of type ntfs.

If you just want all files to appear as if they belong to you, just change the /etc/fstab entry field auto to auto,permissions, or if this doesnt work when mounting via nautilus you can also add ,uid=1000 where 1000 is whatever number the id command shows for your login.

If you want to preserve more finely detailed interoperability with microsoft see the man page for how to map different ntfs user "sids" to Ubuntu ids.

2
  • Is there a way to mount the drive from nautilus and have it under my user?
    – ilyo
    Aug 12, 2015 at 13:38
  • I dont see a way at the moment, but I dont understand how nautilus sends the request to udisksd. You can do by hand what I imagine nautilus should do, and it works ok. eg udisksctl mount --block-device /dev/sdb1 for a disc partition sdb1
    – meuh
    Aug 12, 2015 at 16:17

You must log in to answer this question.

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