1

I'm currently running RHEL 5.5, and I installed the ntfs-3g utility from here: http://www.tuxera.com/community/ntfs-3g-download/. I have also followed their instructions for auto-mounting NTFS USB drives here: http://www.tuxera.com/community/ntfs-3g-faq/#plugandplay.

The problem I'm experiencing is that ntfs-3g is automatically mounting as root. In order for me to obtain write support, I need to navigate to the mounted device as root, and perform write actions with elevated privileges.

Is there a way to mount USB NTFS volumes automatically without needing to sudo every write command?

Thanks!

EDIT: To clarify, these are not devices being mounted at bootup. These are hot-swappable USB sticks and HDD's. They mount automatically, but only root can write.

2 Answers 2

2

You should be able to specify in /etc/fstab that you want to be able to read/write to the device as the normal user, add the flags user rw.

You could also use something like pmount.

8
  • The devices I need to mount are hot-swappable. They are not available at boot time, so unfortunately /etc/fstab will not solve the problem. I modified the original post to clarify. I will look into pmount.
    – Phanto
    Commented Dec 22, 2010 at 12:11
  • 1
    Devices don't need to be available at boot time to be present in /etc/fstab, you can use the option noauto. Commented Dec 22, 2010 at 12:15
  • I'll need to try this out. However, what happens if I have a device that is formatted as FAT? If I plug that device in, it will automatically be detected as, say, /dev/sda1. Would it then try to mount it as NTFS? Would that cause an error?
    – Phanto
    Commented Dec 22, 2010 at 12:48
  • Well, don't use device ID's in /etc/fstab if that is a probem -- mount the drives/partitions using a label instead. The system is free to change the ID's whenever you reboot if it wants to (scan order has changed for instance). Using labels means that even if what was /dev/sdx is now /dev/sdy, it will still mount normally using the label. For example, the entry might look like this: LABEL=foobar /mnt/foobar ntfs noauto 0 0 Commented Dec 22, 2010 at 12:51
  • Unfortunately, you cannot use the user flag. A mount error pop appears with permission errors. I looked at the NTFS-3g site, and their solution doesn't work. tuxera.com/community/ntfs-3g-faq/#useroption2.
    – Phanto
    Commented Dec 22, 2010 at 14:00
0

If the ntfs-3g does not want to mount a drive for write even thou it is set up for the read/write in the fstab happens when you dual boot with Windows 8 or 10. Windows 8 and 10 do not shutdown the drive as usual but they leave it in a hibernated state. If the ntfs-3g detects that it will mount it only for reading.

Workaround that works for me is to avoid selecting the "Shut down" on quitting windows but rather "Restart". After that when I select linux in GRUB menu the NTFS drives are mounted with read/write.

I have this in my /etc/fstab, but it works for me only when I follow the procedure I described above:

/dev/sda14 /media/data ntfs-3g defaults,windows_names,locale=cs_CZ.UTF-8 0 0

locale has to be set according your own locale. Type "locale" in the terminal to see the set locales in your environment.

You must log in to answer this question.

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