Cannot umount ntfs-3g without root prvilege.

Eric L. Chen lihong at ieee.org
Thu Feb 19 04:50:47 PST 2009


On Thu, 2009-02-19 at 20:45 +0800, Eric L. Chen wrote:
> On Wed, 2009-02-18 at 01:09 -0500, Joe Marcus Clarke wrote:
> > On Tue, 2009-02-10 at 17:06 +0800, Eric L. Chen wrote:
> > > On Mon, 2009-02-09 at 13:50 -0500, Joe Marcus Clarke wrote:
> > > > Eric L. Chen wrote:
> > > > > Hi,
> > > > > 
> > > > > I followed http://www.freebsd.org/gnome, try to mount usb disk (ntfs
> > > > > formatted).
> > > > > It can be mounted, but cannot umount.
> > > > > We need ntfs usb disk for large file, since fat cannot support file
> > > > that
> > > > > greater than 2GiB.
> > > > > BTW, I am using ntfs-3g for NTFS read/write support.
> > > > 
> > > > Have you followed the instructions in
> > > > /usr/local/share/docs/hal-0.5.11/README.fuse?
> > > > 
> > > > Joe
> > > > 
> > > Yes, I tried using /usr/local/share/hal/mount-fuse .
> > > # mv /sbin/mount_ntfs /sbin/mount_ntfs.orig
> > > # cp /usr/local/share/hal/mount-fuse /sbin/mount_ntfs
> > > # cp /usr/local/share/hal/mount-fuse /sbin/mount_ntfs-3g
> > > but results the same problem. same as:
> > > # ln -sf /usr/local/bin/ntfs-3g /usr/sbin/mount_ntfs-3g
> > 
> > Can you try this patch to see if unmounting ntfs-3g volumes works:
> > 
> > http://www.marcuscom.com/downloads/patch-tools_hal-storage-unmount.c
> > 
> > Joe
> > 
> It doesn't work, a message box: "umount: unmount of /media/usbdisk
> failed: Operation not permitted"
> 
> # cat /media/.hal-mtab
> /dev/ntfs/usbdisk	1001	0	ntfs-3g
> nosuid,umask=007,dmask=002,fmask=117	/media/usbdisk
> 
> # cat /tmp/.fuse-mnts
> /dev/fuse1=/dev/ntfs/usbdisk
> 
> > gnome-mount -vnbt -u -d /dev/fuse1
> gnome-mount 0.8
> ** Message: Given device '/dev/fuse1' is not a volume or a drive.
> 
> > gnome-mount -vnbt -u -p usbdisk
> gnome-mount 0.8
> Resolved pseudonym "usbdisk" -> /dev/ntfs/usbdisk
> ** (gnome-mount:1728): DEBUG:
> Unmounting /org/freedesktop/Hal/devices/volume_uuid_0A803ABD803AAF57
> ** (gnome-mount:1728): DEBUG: Setting up 750ms timer for Flushing Cache
> dialog
> ** (gnome-mount:1728): DEBUG: in unmount_done : user_data = 0x0
> ** Message: Unmount failed
> for /org/freedesktop/Hal/devices/volume_uuid_0A803ABD803AAF57:
> org.freedesktop.Hal.Device.Volume.NotMountedByHal : Device to unmount is
> not in /media/.hal-mtab so it is not mounted by HAL
> 
> I think unmounting from HAL needs parse /media/.hal-mtab file.
> 
> /Eric

I modified /media/.hal-mtab line 1, from:
/dev/ntfs/usbdisk      1001    0       ntfs-3g
nosuid,umask=007,dmask=002,fmask=117
/media/usbdisk
to:
/dev/fuse1      1001    0       ntfs-3g
nosuid,umask=007,dmask=002,fmask=117
/media/usbdisk

Then, gnome-mount can umount it (by user).
> gnome-mount -vnbt -u -p usbdisk
gnome-mount 0.8
Resolved pseudonym "usbdisk" -> /dev/ntfs/usbdisk
** (gnome-mount:1818): DEBUG:
Unmounting /org/freedesktop/Hal/devices/volume_uuid_0A803ABD803AAF57
** (gnome-mount:1818): DEBUG: Setting up 750ms timer for Flushing Cache
dialog
** (gnome-mount:1818): DEBUG: in unmount_done : user_data = 0x0
Unmounted /dev/ntfs/usbdisk

But still cannot unmount from nautilus' menu (by right click drive icon
on desktop). 

/Eric




More information about the freebsd-gnome mailing list