Red Hat Bugzilla – Bug 89173
eject fails on scsi cdrom when executed as normal user
Last modified: 2007-04-18 12:53:09 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
Description of problem:
when executing eject on /dev/cdrom, the disk fails to eject, giving error
message "eject: unable to eject, last error: Invalid argument".
When executed as root, same error message, but drive opens.
This happens regardless of whether the disk is mounted or not (if data) or
playing or not (if music).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Type 'eject /dev/cdrom' at command prompt
Actual Results: Drive door remains closed; error message given above in
description is printed.
Expected Results: Drive door should open and eject disk, with no error message
Output of 'eject -v /dev/cdrom':
eject: device name is `/dev/cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/scd0'
eject: `/dev/scd0' is not mounted
eject: `/dev/scd0' is not a mount point
eject: `/dev/scd0' is not a multipartition device
eject: trying to eject `/dev/scd0' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/scd0' using SCSI commands
eject: SCSI eject failed
eject: trying to eject `/dev/scd0' using floppy eject command
eject: floppy eject command failed
eject: trying to eject `/dev/scd0' using tape offline command
eject: tape offline command failed
eject: unable to eject, last error: Invalid argument
When same commmand is given as root, there is a pause of about two seconds
before printing the line 'eject: SCSI eject failed', and it is at this point
that the disk is ejected (but the errors are still printed).
The permissions on /dev/scd0 are
brw------- 1 jwillis disk
so the normal user (jwillis) should have read/write permission to the disk.
Drive is a TEAC SCSI CD-ROM, CD-532S, Rev 1.0A
One other note: the content of /proc/sys/dev/cdrom/lock is '1', irrespective of
whether there's a disk in the drive or not, the drive is mounted or not (or
playing if music) or even if the drive is open. I'm not knowlegeable enough
to know what this file is supposed to do, but I would have thought it should
change depending on the status of the drive. But perhaps not and this has
nothing to do with the problem.
*** This bug has been marked as a duplicate of 101533 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.