 |
 |
 |
 |
| Hardware & Laptops Help with your hardware, including laptop issues |

9th February 2011, 10:31 PM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 48

|
|
|
Ejecting USB NTFS drives
Not sure where to put this so please let me know if this does not belong here.
I recently noticed that the "eject" command will not work on NTFS formatted USB drives. It errors out with something like:
umount: <path to mount point> is not in fstab (and you are not root)
It works if you are root. I can also eject the drive from the nautilus desktop as an unprivileged user. This command also works if the drive is FAT formatted and I am an unprivileged user.
I only started to notice this behavior after I switch to F14. F11, F12, and F13 did not seem to have this issue.
Anyone have any clues as to how to fix this?
BTW, auto-mounting works just fine, just plug the drive in (no "mount" command necessary). I'm only having issues with the "eject" command as an unprivileged user.
|

15th February 2011, 01:57 AM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 48

|
|
|
Re: Ejecting USB NTFS drives
Giving this a bump, just so I don't have to repost.
Is this a known problem?
|

15th February 2011, 02:31 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,101

|
|
|
Re: Ejecting USB NTFS drives
Try "eject -v <device>" to see what is going on. I think it must be
the real device and not the mount point.
It is possible that because disks (even when used through the USB) do
not support the eject directly. I know I have had problems with eject
not working, but would work fine if the device is dismounted (well... there
would be nothing to do in this case).
|

15th February 2011, 07:15 AM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
|
Re: Ejecting USB NTFS drives
Quote:
Originally Posted by rossman_2
Giving this a bump, just so I don't have to repost.
Is this a known problem?
|
Try it and I will delete it
|

15th February 2011, 08:18 PM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 48

|
|
|
Re: Ejecting USB NTFS drives
When I run eject with a -v on the mount point I get the following:
Code:
$ eject -v /media/SmallDisk/
eject: device name is `/media/SmallDisk'
eject: expanded name is `/media/SmallDisk'
eject: `/dev/sdb1' is mounted at `/media/SmallDisk'
eject: checking if device "/dev/sdb1" has a removable or hotpluggable flag
eject: unmounting device `/dev/sdb1' from `/media/SmallDisk'
umount: /media/SmallDisk is not in the fstab (and you are not root)
eject: unmount of `/media/SmallDisk' failed
When I run eject with a -v on the actual device I get this:
Code:
$ eject -v /dev/sdb1
eject: device name is `/dev/sdb1'
eject: expanded name is `/dev/sdb1'
eject: `/dev/sdb1' is mounted at `/media/SmallDisk'
eject: checking if device "/dev/sdb1" has a removable or hotpluggable flag
eject: unmounting device `/dev/sdb1' from `/media/SmallDisk'
umount: /media/SmallDisk is not in the fstab (and you are not root)
eject: unmount of `/media/SmallDisk' failed
Again this only happens if I run eject as a regular user. Also, the ejecting the drive with the nautilus menu works fine as a regular user. And this only seems to happen with NTFS file systems, as far as I can tell.
|

15th February 2011, 09:00 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,101

|
|
|
Re: Ejecting USB NTFS drives
No, it happens with other types of mounts too.
The requirement is that the drive be dismounted. If the filesystem layer
takes too long, or, the application doesn't know how to dismount, an
eject SHOULD fail.
In this case, it doesn't know how to dismount (not in fstab). It also can't
dismount as you are not root - which is the other way to dismount.
The root restriction is because if any user could unmount a filesystem
(when not the owner of the device) then you get a security problem -
all the way from a denial of service, to hijacking data on someone elses
disk.
How did you mount the disk? Manually?
|

15th February 2011, 09:28 PM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 48

|
|
|
Re: Ejecting USB NTFS drives
I'm logged into the desktop locally (through gnome) so I just plugged the drive in (it's USB) and it auto mounts. I've tried this with 2 different NTFS formatted drives and they give the same result, so I'm pretty sure it's not the drive. However, FAT32 formatted USB drives do not have this problem (I can use "eject" as an unprivileged user to unmount the drive).
|

15th February 2011, 09:28 PM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 48

|
|
|
Re: Ejecting USB NTFS drives
I'm logged into the desktop locally (through gnome) so I just plugged the drive in (it's USB) and it auto mounts. I've tried this with 2 different NTFS formatted drives and they give the same result, so I'm pretty sure it's not the drive. However, FAT32 formatted USB drives do not have this problem (I can use "eject" as an unprivileged user to unmount the drive).
|

15th February 2011, 09:43 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,101

|
|
|
Re: Ejecting USB NTFS drives
I now suspect this is a bug, since it seems to be only NTFS related.
I thought it might have been mounted as root, but automounting on
connection should make it owned by the GUI logged in user.
Out of curiosity, what does "mount" show for this drive? if it shows
something like "mode=777", then it quite possibly is mounted as root,
but it should show something like "uid=<nnn>,gid=<nnn>", which would
allow you to dismount it using eject (at least it does for me).
|

15th February 2011, 10:04 PM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 48

|
|
|
Re: Ejecting USB NTFS drives
Not sure what you mean by "mount" as when I run the "mount" command it doesn't display anything like what you're describing.
I can tell you that when I "ls" the mount point it shows it as being owned by me (unprivileged user and group) and that the mode is "700" or "drwx------".
|

15th February 2011, 10:04 PM
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 48

|
|
|
Re: Ejecting USB NTFS drives
Not sure what you mean by "mount" as when I run the "mount" command it doesn't display anything like what you're describing.
I can tell you that when I "ls" the mount point it shows it as being owned by me (unprivileged user and group) and that the mode is "700" or "drwx------".
|

15th February 2011, 10:08 PM
|
|
Registered User
|
|
Join Date: Jun 2007
Location: Lake Mary, Florida
Age: 48
Posts: 1,082

|
|
|
Re: Ejecting USB NTFS drives
Hello,
Never used eject on nfs mounts.
Only used eject on my DVD drive and umount on mounted FS
|

15th February 2011, 10:28 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,101

|
|
|
Re: Ejecting USB NTFS drives
The mount command will list all mounted partitions, with device, filesystem
and mount options.
I was just curious what it showed for the NTFS system.
---------- Post added at 05:28 PM ---------- Previous post was at 05:25 PM ----------
Quote:
Originally Posted by scott32746
Hello,
Never used eject on nfs mounts.
Only used eject on my DVD drive and umount on mounted FS
|
The only reason to use it is for external USB drives. For that
you SHOULD get the equivalent action that occurs with the
CD/DVD - the filesystem is unmounted, and buffers released.
Just some USB drives (such as flash, or USB disk adapters) don't
have a physical function for eject, doesn't prevent the command
from trying. But to do it, the user must have ownership of the
device...
|

16th February 2011, 05:31 AM
|
|
Registered User
|
|
Join Date: Nov 2007
Location: Berkeley, California
Posts: 690

|
|
|
Re: Ejecting USB NTFS drives
Quote:
Originally Posted by rossman_2
I'm logged into the desktop locally (through gnome) so I just plugged the drive in (it's USB) and it auto mounts. I've tried this with 2 different NTFS formatted drives and they give the same result, so I'm pretty sure it's not the drive. However, FAT32 formatted USB drives do not have this problem (I can use "eject" as an unprivileged user to unmount the drive).
|
I do not use eject to dismount USB drives so I cannot say whether what you are reporting is a bug or not. Your disk is most likely being mounted by udisks. This is the latest incarnation of DeviceKit, so this may explain why the behavior you are observing now differs from previous Fedora releases. You can unmount USB disks, which are automounted when you plug them in – by executing
Code:
udisks --umount /dev/sd<letter>1
Last edited by Mariusz W; 16th February 2011 at 07:12 AM.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 03:18 (Tuesday, 21-05-2013)
|
|
 |
 |
 |
 |
|
|