[linux-audio-user] audio cdrom permissions

Paul Perkins speaker-to-vegetables at pobox.com
Mon May 19 10:18:59 EDT 2003

Under 2.4.x kernel (or earlier), burning CDs (and possibly ripping audio
CDs too) needs access to the "generic scsi" device for the drive (don't
you love those violent terms for copying data?). Conventionally called
/dev/sg0, device (21,0). The "0" may be another number if you have
multiple real or emulated SCSI devices. I'm not sure, but I think this
may change in the 2.6 kernel series.

If some of the applications you are using are installed with set-uid,
(perhaps on a helper program rather than the main one), that would
explain why similar actions may only work as user root in one
application, but work as a normal user in another application.

On Sun, 2003-05-18 at 13:03, derek holzer wrote:
> i've been having a bit of trouble with playing and ripping CDs, maybe 
> someone here can help?
> i'm running Debian on a laptop, and as root i don't have any serious 
> problems doing either, but as a user it becomes a bit wierd... let me 
> explain...
> as user, i am in groups cdrom and disk. i have set permissions as follows:
> in /dev:
> lr-xr-xr-x    1 root     root           13 May 18 17:31 cdrom -> 
> cdroms/cdrom0
> drwxr-xr-x    1 root     root            0 Jan  1  1970 cdroms
> in /dev/cdroms
> lr-xr-xr-x    1 root     root           34 Jan  1  1970 cdrom0 -> 
> ../scsi/host1/bus0/target0/lun0/cd
> in /dev/scsi/host1/bus0/target0/lun0/
> brw-rw-rw-    1 root     cdrom     11,   0 Jan  1  1970 cd
> i have none of these other cdrom devices listed in /dev:
> /dev/hdc
> /dev/sr0
> /dec/scd0
> but my drive appears to be ATAPI with SCSI emulation. i have added the 
> following to my /etc/lilo.conf to reflect this:
> append="hdc=ide-scsi"
> although commenting this out doesn't seem to do much.
> i can rip CDs as a user with Grip, but RipperX tells me i need 
> permission to access the CD drive [cannot open cdrom drive]. i can play 
> CD audio with Alsaplayer, but not with XMMS.  likewise, xfreecd doesn't 
> find the drive, but workman does. very inconsistant! running cdparanoia 
> -vQ as user gives the following:
> Checking /dev/cdrom for cdrom...
>     Testing /dev/cdrom for cooked ioctl() interface
>         /dev/scsi/host1/bus0/target0/lun0/cd is not a cooked ioctl CDROM.
>     Testing /dev/cdrom for SCSI interface
>         No generic SCSI device found to match CDROM device 
> /dev/scsi/host1/bus0/target0/lun0/cd
> it seems that there are still some permissions to change somewhere, but 
> i can't for the life of me figure out where!
> what have i missed?
> thanks,
> derek

sigmotto: Liberty is theft.

More information about the Linux-audio-user mailing list