Auto-mounting USB NTFS drives under FreeBSD 10.1

Hi,

The following command works as root:

ntfs-3g /dev/da0s1 /media/Data

However, I would like to auto-mount this drive using HAL in my MATE desktop as a regular user. How can I make that work?

(UBS pendrives work fine, I can mount and unmount them just fine.)

If this helps, the following command fails as a regular user:

Code:
$ ntfs-3g /dev/da0s1 ~/Data
mount_fusefs: /dev/fuse on /usr/home/angrywolf/Data: Operation not permitted
fuse: failed to mount file system: No such file or directory

Code:
$ ls -l /dev/fuse*
crw-rw----  1 root  operator  0x32 Jan 11 16:59 /dev/fuse
$ groups angrywolf
angrywolf wheel operator vboxusers


Thanks in advance.
 
Well if there is no such solution yet, I can accept this one (written into /etc/fstab):

Code:
/dev/da0s1   /mnt/Data     ntfs     rw,mountprog=/usr/local/bin/ntfs-3g     0   0

The down-side of this approach is that if it's booted at system start up, like it is set now, and the USB hard drive happens to be not connected, the system will refuse booting, rather than silently falling back to not mounting the file system. Too bad.
 
Are you aware of sysctl -d vfs.usermount?
Code:
vfs.usermount: Unprivileged users may mount and unmount file systems

The caveat is the user has to own where they are mounting the drive to in order to keep them from maliciously mounting their own version of important files over the top of the system ones.
 
Hi junovitch,

Yes, I can assure you I had put the following line into sysctl.conf long before I attempted to try out USB storages on it (I had also set it on command line so I hadn't had to reboot):

Code:
vfs.usermount=1

Anyway, thanks for replying.
 
Back
Top