Excerpts from Heiko Baums's message of 2011-08-18 19:03:19 +0200:
Am Thu, 18 Aug 2011 13:44:23 -0300 schrieb Norbert Zeh <nzeh@cs.dal.ca>:
I have a strange problem with ejecting CDs from my CD drive.
As root:
eject and eject -t work flawlessly eject -T gives
ioctl: Input/output error
As non-root user:
eject -t closes the tray as expected eject gives
eject: unable to eject, last error: Inappropriate ioctl for device
eject -T gives the same result as for root
It doesn't matter whether I do or do not specify sr0 as the device to eject. The non-root user that I try to execute this command as is in the optical group.
...
Does anybody else experience this type of problem? Does anybody have any pointers what may be wrong with my setup?
Eject only works for root. So you have to use sudo to be able to ejecting the CDs.
Heiko
Definitely not true, it works here without being root, but: $ eject eject: unable to find or open device for: `cdrom' $ eject /dev/sr0 works $ eject -T /dev/sr0 (while tray is ejected) eject: CD-ROM tray close command failed: Input/output error $ sudo eject -T /dev/sr0 Password: eject: CD-ROM tray close command failed: Input/output error or anything else that should pull the tray back in doesn't work on my machine, according to 'man eject' this may simply be a hardware limitation. Nothing was mounted in my test case, there's no CD inserted. I do somewhat understand the behavior of my machine but not the behavior on the original posters machine. In any case, root/sudo is not required.