[uae] Re: SCSI emulation fails on my A1 with 2.4.22 kernel

  • From: Staf Verhaegen <staf.verhaegen@xxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Sun, 02 May 2004 09:21:49 +0200

On Sun, 2004-05-02 at 01:39, Staf Verhaegen wrote:
> On Sun, 2004-05-02 at 00:08, Richard Drummond wrote:
> > Hi Staf
> > 
> > On Saturday 01 May 2004 06:35 am, Staf Verhaegen wrote:
> > > I downloaded uae-0.8.25-20040302-ppc-glibc2 from the website and I'm
> > > trying to get the SCSI emulation working with my CDROM. It is running on
> > > a debian stable system with some parts upgraded to testing with a 2.4.22
> > > kernel.
> > 
> > This is probably because you are running UAE as a user without permission 
> > to 
> > access /dev/sg0.
> 
> exactly. Maybe you should change the output to something like 'could not
> open /dev/sg0'. I would have find the error then.

It seems I cheered to early. The access right for /dev/sg0 have always
been OK:
amigaone:~$ ls -l /dev/sg0
crw-rw----    1 root     cdrom     21,   0 Mar 14  2002 /dev/sg0

I thought I was not member of the cdrom group but it seems I am:
amigaone:~$ id
uid=500(verhaegs) gid=100(users) groups=100(users),24(cdrom)

I becomes even weirder I open /dev/sg0 for everybody but remove the suid
bit from cdrecord (as root):
amigaone:/home/verhaegs# chmod 666 /dev/sg0
amigaone:/home/verhaegs# chmod 755 /usr/bin/cdrecord
amigaone:/home/verhaegs# ls -l /dev/sg0 /usr/bin/cdrecord
crw-rw-rw-    1 root     cdrom     21,   0 Mar 14  2002 /dev/sg0
-rwxr-xr-x    1 root     cdrom      213172 Apr 10  2002
/usr/bin/cdrecord

Now cdrecord can't find my CDROM either:
amigaone:~$ cdrecord -scanbus
Cdrecord 1.10 (powerpc-unknown-linux-gnu) Copyright (C) 1995-2001 Jörg
SchillingLinux sg driver version: 3.1.25
cdrecord: Permission denied. Cannot open '/dev/sg2'. Cannot open SCSI
driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you
are root.

Enabling the suid bit again allows cdrecord to report the CDROM again.

It seems that only when the suid bit is set that /dev/sg0 report my
CDROM on the SCSI chain. This is above my head and a Google search did
not enlighten me either.
Seems I will need to build a non-GUI version if I want to use scsi
emulation with my cdrom :(

greets,
Staf.



Other related posts: