Re: /dev/cdrom is not a valid block device

From: Jan Minar (Jan.Minar_at_seznam.cz)
Date: 01/05/04

  • Next message: Jan Minar: "Re: /dev/cdrom is not a valid block device"
    Date: Mon, 5 Jan 2004 10:21:23 +0100
    To: debian-user@lists.debian.org
    
    
    

    Hi, Stephen.

    On Mon, Jan 05, 2004 at 04:51:06AM +0800, Stephen Liu wrote:
    > $ eject /mnt/cdrom or
    > $ eject /mnt/cdwriter
    > did not work.

    Ejecting the device is done by ioctl(2)-ing the device, i.e. writing to
    it:

    | (#:/usr/src/linux-2.4.23)- sudo -u toor eject
    | eject: unable to find or open device for: `cdrom'

    --where `toor' is an unprivileged user.

    You must have a write access to the device to accomplish this. The
    Debian way is, as was already pointed out by David Goodenough:

    > > > Add yourself to the cdrecording group, (or whichever group /dev/hdc is
    > > > owned by).

    -- You didn't do your homework, did you :-(

    If you are worried by the problems of the group-driven security, create a
    new group for the /dev/cdrom device, or use sudo. If the limitations of
    the Unix security model are unbearable, you might consider using kernel
    patches allowing more fine-grained security control, e.g. RSBAC. Maybe
    the new security framework of the 2.6 line will do something for you,
    too.

    In my case, for example, all the cdrom drives are owned by root.cdrom
    % ls -l /dev | grep cdrom | grep hdc
    lrwxrwxrwx 1 root root 3 Dec 10 03:45 cdrom -> hdc
    brw-rw---- 1 root cdrom 22, 0 Mar 14 2002 hdc
    % grep cdrom /etc/group
    cdrom:x:24:jan

    The `user' or `users' option in /etc/fstab will allow the user to
    _mount_ the _filesystem_, not read/write the raw device. man mount for
    details.

    Please make sure to understand the advises before reporting further
    problems the next time :-(

    HTH.

    -- 
    Jan Minar                   "Please don't CC me, I'm subscribed." x 7
    
    

    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    


  • Next message: Jan Minar: "Re: /dev/cdrom is not a valid block device"

    Relevant Pages

    • Re: RFC - What should be on a Windows 2000 Pro Update Security Patch CDROM
      ... > I'm building a Windows 2000 Pro Update Security Patch CDROM ... > I also am building a Windows XP Upgrade Security Patch CDROM ... > b) word documentation covering service packs, security patches, ...
      (microsoft.public.win2000.windows_update)
    • Re: media player access for user
      ... Use Mandrake Control Center to lower the security level. ... the abilities back to the user at the expense of system security. ... Learn how to explicitly grant access to the users the ability to do the ... cdrom for a particular user, make them a part of the "cdrom" or "cdwriter" ...
      (alt.os.linux)
    • Re: Sharing CD-ROM over Samba on Fedora 8
      ... Fedora 8 mounts the cdroms in the /media folder however a folder with the name of the cdrom shows up there, i.e. say for example I had a cdrom with the name "FedoraList" I would have /media/FedoraList in that folder which makes it difficult to share the cdrom drive itself. ... The home directories work fine with security = user, however they disappear leaving on the cdrom folder showing with security = share, the cdrom folder however still doesn't share the contents of the cdrom though. ...
      (Fedora)
    • Re: Sharing CD-ROM over Samba on Fedora 8
      ... Fedora 8 mounts the cdroms in the /media folder however a folder with the name of the cdrom shows up there, i.e. say for example I had a cdrom with the name "FedoraList" I would have /media/FedoraList in that folder which makes it difficult to share the cdrom drive itself. ... The home directories work fine with security = user, however they disappear leaving on the cdrom folder showing with security = share, the cdrom folder however still doesn't share the contents of the cdrom though. ...
      (Fedora)
    • Re: SUCCESS AT LAST
      ... >> "If the game wants to run from the CD, then your problem is that you ... >> not mount the CDROM drive in the .conf file or manually. ... guess you have to do two separate lines for the two drives.. ...
      (comp.sys.ibm.pc.games.adventure)