Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer
    
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 Dec 22 '10 at 12:11
    
Devices don't need to be available at boot time to be present in /etc/fstab, you can use the option noauto. –  Matthieu Cartier Dec 22 '10 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 Dec 22 '10 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 –  Matthieu Cartier Dec 22 '10 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 Dec 22 '10 at 14:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.