Bug 101533 - gnome, user cannot eject USB ZIP disk
gnome, user cannot eject USB ZIP disk
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: eject (Show other bugs)
2
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Pete Zaitcev
:
: 75513 89173 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-02 22:16 EDT by Dmitri A. Sergatskov
Modified: 2007-11-30 17:10 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-01 12:14:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dmitri A. Sergatskov 2003-08-02 22:16:33 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624
Netscape/7.1

Description of problem:
I cannot eject zip disk from an external USB ZIP (250 Meg/USB powered) neither
as a user (eject /mnt/zip), nor by clicking on the icon on the
gnome desktop and selecting eject. It seems to be a permission problem
accessing /dev/sda. This is on 3 different computers: Athlon-XP, 
Athlon-MP, Toshiba laptop. 
I can eject disk either pressing a button on the drive (after umounting it), or
doing 'eject /mnt/zip' as root (though it takes forewer -- few minutes).
Surprisingly, parallel port ZIP (original, 100MB) works fine.

 

Version-Release number of selected component (if applicable):
kernel-2.4.20-19.9.athlon.rpm

How reproducible:
Always

Steps to Reproduce:
1. As a user, insert disk in USB drive. Mount it. Copy some files on it.
2. Type 'eject /mnt/zip'. Or click on the desktop disk icon and select 
   eject
3.
    

Actual Results:  Disk gets unmounted, but not ejected.

Expected Results:  Disk ejects.

Additional info:
Comment 1 Pete Zaitcev 2004-04-05 22:28:16 EDT
Woops, forgot about this one. This obviosly has nothing to do
with kernel, but I forgot to punt the bug to relevant component.
In fact, it's pretty unobvious what that component might be...
Probably, nautilus.

Does it still fail on Fedora Core 1?
Comment 2 Pete Zaitcev 2004-04-05 22:43:40 EDT
Re. the component, the permission change is done by pam_console.
Naturally, if devices are added after login (magicdev or else),
you'd have to re-login once for it to take effect. Annoying, but...
Comment 3 Dmitri A. Sergatskov 2004-04-06 14:00:57 EDT
The problem is still in FC1. 
I do not quitye understand what does "device added" mean.
The ZIP drive plugged into computer all the time. Does device get
added when I plug an actual disk into it? I actually tried rebootng
computer with ZIP disk in the drive. It does not change a thing. The
same problem exists with internal IDE ZIP drive, last time it worked
with RH6.2).
The ejecting works with CDROM and I do not understand what is so
different ZIP and CDROM, I do not claim to be an expert either.
BTW, IDE ZIP disk hangs computer every now and then -- I did file a
bug report a couple years ago, but since there were no response I got 
myself a USB ZIP, which solved that problem for me.
Comment 4 Dmitri A. Sergatskov 2004-04-08 15:17:35 EDT
This is an output of "eject -v /mnt/zip" issued as normal user:
[dima@tumbleweed dima]$ eject -v /mnt/zip/
eject: device name is `/mnt/zip'
eject: expanded name is `/mnt/zip'
eject: `/dev/sda4' is mounted at `/mnt/zip'
eject: unmounting `/dev/sda4'
eject: `/dev/sda4' is a multipartition device
eject: trying to eject `/dev/sda4' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/sda4' using SCSI commands
eject: SCSI eject failed
eject: trying to eject `/dev/sda4' using floppy eject command
eject: floppy eject command failed
eject: trying to eject `/dev/sda4' using tape offline command
eject: tape offline command failed
eject: unable to eject, last error: Invalid argument
Comment 5 Dmitri A. Sergatskov 2004-05-20 22:18:50 EDT
It kind of works in FC2: disk ejects, but I stil get an 
error "Unable to eject media" (Show more details: "eject: unable to
eject, last error: Invalid argument") 
Comment 6 Pete Zaitcev 2004-08-19 19:33:24 EDT
Reassigning to eject component to take care of the message
(maybe an ioctl is missing, in which case there should be no message,
or a better message).
Comment 7 Tim Waugh 2004-08-27 04:17:26 EDT
Now in rawhide we're back to not even being able to open the device. 
Strace shows:

[...]
open("/dev/sdb4", O_RDONLY|O_NONBLOCK)  = -1 EACCES (Permission denied)

even though /dev/sdb4 ownership is me:disk and perms are brw-------.

If I try as root I get:

[...]
ioctl(3, CDROMEJECT, 0x8983898)         = -1 EIO (Input/output error)
ioctl(3, FIBMAP, 0xfef246e0)            = 0
ioctl(3, FIBMAP, 0xfef246e0)            = 0
ioctl(3, FIBMAP, 0xfef246e0)            = 0
ioctl(3, BLKRRPART, 0xfef246e0)         = -1 EINVAL (Invalid argument)
ioctl(3, FDEJECT, 0xfef246e0)           = -1 EINVAL (Invalid argument)

and an Invalid argument message, but the disk ejects.  It is the third
FIBMAP ioctl that does it (there is a lengthy pause before '= 0' while
it ejects).
Comment 8 Ngo Than 2004-09-08 06:53:35 EDT
*** Bug 75513 has been marked as a duplicate of this bug. ***
Comment 9 Ngo Than 2004-09-08 07:01:26 EDT
*** Bug 89173 has been marked as a duplicate of this bug. ***
Comment 10 Ngo Than 2004-12-01 12:14:24 EST
it's fixed in eject-2.0.13-13, which will show up in the rawhide soon.
Comment 11 David Balažic 2005-04-21 09:52:09 EDT
I have a similar problem in Fedora Core 4 test2 :

# eject  /dev/hdd
eject: unable to eject, last error: Invalid argument

hdd is LS-120 CSMO 05 UHD Floppy, ATAPI FLOPPY drive

eject-2.0.13-14
Comment 12 David Balažic 2005-04-26 04:04:33 EDT
I also noticed this additional error output :
root# eject /dev/hdd
ide-floppy: hdd: I/O error, pc = 1b, key =  5, asc = 24, ascq =  0
eject: unable to eject, last error: Invalid argument

Should I open a new bog for FC4 or reopen this one ?
Comment 13 Pete Zaitcev 2005-05-13 20:47:14 EDT
David - please open a new report for the ide-floppy case. Different drivers.

Note You need to log in before you can comment on or make changes to this bug.