Bug 89173

Summary: eject fails on scsi cdrom when executed as normal user
Product: [Retired] Red Hat Linux Reporter: Josh Willis <jwillis>
Component: ejectAssignee: Than Ngo <than>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:52:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Josh Willis 2003-04-19 05:56:53 UTC
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):
eject-2.10.13-2

How reproducible:
Always

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
printed.

Additional info:

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.

Comment 1 Than Ngo 2004-09-08 11:01:25 UTC

*** This bug has been marked as a duplicate of 101533 ***

Comment 2 Red Hat Bugzilla 2006-02-21 18:52:44 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.