• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[solved] Probleme mit K3b (cdrecord has no permissions)

maniac1810

Newbie
ich habe ein kleines Problem mit K3b (0.11.6 auf Suse 9)

wenn ich versuche eine cd-rw zu löschen bekomme ich folgende Fehlermeldung:
Code:
cdrecord has no permissions to open the device

ich hab eingegben:

"chown root cdrecord" (root als Besitzer)
"chgrp burning cdrecord" (burning als Gruppe)
"chmod +s cdrecord" (suid-Bit setzen)

das gleich noch mal für cdrdao

wenn ich nun eingebe "cdrecord --scanbus" kommt folgende Ausgabe.

Code:
cdrecord --scanbus
Cdrecord-Clone 2.01a18-dvd (i686-suse-linux) Copyright (C) 1995-2003 Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to <warly@mandrakesoft.com>.
Note: The author of cdrecord is not to be bothered with problems in this version.
cdrecord: No such file or directory. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

ich weiss nicht so recht weiter, kann jemand helfen?

Das device ist ein LG DVD brenner GSA 4040B eingerichtet als /dev/sr0. Die scsi emulation läuft, DVD`s können mit growisofs gebrannt werden.
 

wenf

Hacker
manchesmal kommt es vor dass cdrecord nicht von normalen usern bedient werden darf

k3b steuert auch nur cdrecord oder cdrdao

dies einzustellen ist nicht immer ganz so einfach

versuch doch mal dein glück mit [ALT] + [F2]
Code:
kdesu k3b

und schon arbeitet k3b als root (auch wenn du als normaler user angemeldet bist)
 
OP
maniac1810

maniac1810

Newbie
naja das würde schon gehen, aber solche "quick 'n dirty" Lösungen mag ich irgendwie nicht so recht. Ausserdem löst es das Problem nicht!

Noch andere Vorschläge? :?:
 

wenf

Hacker
da fehlt bestimmt das setuid bit von cdrecord

bitte Vorsicht

The Setuid Bit


In certain situations, the access permissions may be too restrictive. Therefore, Linux has additional settings that enable the temporary change of the current user and group identity for a specific action.


For example, the cdrecord program normally requires root permissions to access the writer for writing CDs (or DVDSs). Thus, a normal user would not be able to create CDs, as it would be too dangerous to grant all users direct access to all devices.


A possible solution to this problem is the setuid mechanism. setuid (set user ID) is a special file attribute that instructs the system to execute programs marked accordingly under a specific user ID. Consider the cdrecord command:


$ >ls -l /usr/bin/cdrecord
-rwxr-x--- 1 root root 281356 2002-10-08 21:30 /usr/bin/cdrecord



Set the setuid bit with the command chmod:


$ >chmod u+s /usr/bin/cdrecord



The following command assigns the cdrecord program to the group users:


$ >chgrp users /usr/bin/cdrecord



The following access permissions are granted:


$ >ls -l /usr/bin/cdrecord
-rws--x--- 1 root users 281356 2002-10-08 21:30 /usr/bin/cdrecord



By means of the setuid bit, all users belonging to the group users will be able to use the program. In effect, this means that the program is executed as root.


Warning

Setting the setuid bit for a program makes your computer more vulnerable to attacks. Only do this in exceptional cases when you know the program well and are aware of the potential risks.
 
Hallo

Leider hilft auch dieses hier auch nicht zum gewünschten Ergebnis: K3b brennt unter root, aber nicht als user...

"keine Berechtigungen...."

Dabe habe ich mit

-rwxrwxrwt 1 root users 364570 2004-04-06 03:28 /usr/bin/cdrecord

Wirklich alles freigegeben was nur geht... :(

Munter bleiben: Jan Henning
 
A

Anonymous

Gast
Jan Henning schrieb:
-rwxrwxrwt 1 root users 364570 2004-04-06 03:28 /usr/bin/cdrecord
Das sollte aber eigentlich so aussehen: "-r-sr-xr-x 1 root root" - da hast Du offenbar doch nicht setuid berücksichtigt, oder? Ich seh da kein "s"...
 
Jan Henning schrieb:
-rwxrwxrwt 1 root users 364570 2004-04-06 03:28 /usr/bin/cdrecord
Das sollte aber eigentlich so aussehen: "-r-sr-xr-x 1 root root" - da hast Du offenbar doch nicht setuid berücksichtigt, oder? Ich seh da kein "s"...
 

Hermann

Hacker
Hallo maniac1810,

bei mir hat folgendes geholfen:

als root bei den Dateien /usr/bin/cdrdao & /usr/bin/cdrecord die Gruppe auf disk setzen, dann dem User (also Dir) die Gruppe disk hinzufügen. Damit die neuen Einstellungen aktiviert werden KDE neu starten.

Gruß, Hermann
 
Hallo

So, mit -rwsr-xr-x 1 root users 364570 2004-04-06 03:28 /usr/bin/cdrecord ist es vielleicht besser - in der Paxis aber nicht.

mit cdrecord -scanbus

bekomme ich als User nur ein:

cdrecord -scanbus
Cdrecord-Clone-dvd 2.01a27 (i686-suse-linux) Copyright (C) 1995-2004 Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to http://www.suse.de/feedback
Note: The author of cdrecord should not be bothered with problems in this version.
cdrecord: No such file or directory. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

Als root ist alles OK:

cdrecord -scanbus
Cdrecord-Clone-dvd 2.01a27 (i686-suse-linux) Copyright (C) 1995-2004 Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to http://www.suse.de/feedback
Note: The author of cdrecord should not be bothered with problems in this version.
Linux sg driver version: 3.5.30
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version (okir@suse.de-scsi-linux-sg.c-1.80-resmgr-patch '@(#)scsi-linux-sg.c 1.80 04/03/08 Copyright 1997 J. Schilling').
scsibus0:
0,0,0 0) *
0,1,0 1) 'IBM ' 'DCAS-34330 ' 'S65A' Disk
0,2,0 2) 'PLEXTOR ' 'CD-ROM PX-40TS ' '1.14' Removable CD-ROM
0,3,0 3) 'PLEXTOR ' 'CD-R PX-W4012S' '1.04' Removable CD-ROM
cdrecord: Warning: controller returns wrong size for CD capabilities page.
0,4,0 4) 'PIONEER ' 'DVD-ROM DVD-303 ' '1.10' Removable CD-ROM
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *

Wo muß dran drehen das es auch als normaler benutzer funktioniert?

Munter bleiben: Jan Henning
 
Hallo

Ich habe nun wirklich alle Möglichkeiten für cdrecord Zugriffsrechte ausprobiert, aber irgendwo stimmt immer noch was nicht.

Am Schluß habe ich exakt den oben und im SuSE-handbuch angegeben Situation hergestellt

-rwsr-x--- 1 root users 364570 2004-04-06 03:28 /usr/bin/cdrecord

Immer noch kein Erfolg. :(

Die Fehlermeldung oben aus dem Beitrag gibt mir aber zu denken: GIb es gesonderte Rechte für den SCSI-Bus?

Besonders interessant finde ich das cdrdao auch als User keine Probleme hat:

cdrdao scanbus
Cdrdao version 1.1.8 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'schily-0.8'

0,2,0: PLEXTOR , CD-ROM PX-40TS , 1.14
0,3,0: PLEXTOR , CD-R PX-W4012S, 1.04
0,4,0: PIONEER , DVD-ROM DVD-303 , 1.10

Die Recht sind exakt die gleichen wie bei cdrecord.

Hat noch jemand eine Idee? Kann es mit dem SCSI-Bus zu tun haben? Oder mit dem resmgr (habe ich bei meiner Lösungssuche auch schon gelesen...?

Munter bleiben: Jan Henning
 
Hallo

So, die Lösung meines Problems:

Es liegt an der resmgr-Konfiguration von SUSE.

Ich schwafel jetzt nicht rum sondern poste gleich die Lösung, es düfte nämlich so oder so ähnlich alle SCSI-Brenner-Besitzer betreffen:

resmgr.conf geändert:

# CD-ROMs - giving permission to open the corresponding SCSI
# device is highly useful for CD writers such as cdrecord.
add /dev/cdrom          desktop scsi paride
add /dev/cdrom1         desktop [/b]scsi[/b] paride
add /dev/cdrecorder     desktop scsi
add /dev/dvd            desktop scsi paride
add /dev/dvd1           desktop scsi paride
add /dev/sr0            desktop scsi
add /dev/sr1            desktop scsi
add /dev/sr2            desktop scsi
add /dev/sr3            desktop scsi

Damit erzeugt /sbin/resmgr list als User endlich auch einen sinnvolle Ausgabe:

rw-- /dev/audio
rw-- /dev/mixer
rw-- /dev/dsp
rw-- /dev/sequencer
rw-- /dev/video
rw-- /dev/modem
rwsp /dev/cdrom
rwsp /dev/cdrom1
rws- /dev/cdrecorder
rwsp /dev/dvd
rwsp /dev/dvd1
rws- /dev/sr0
rws- /dev/sr1
rws- /dev/sr2
rws- /dev/sr3
rws- /dev/scanner
r--- /dev/console
rw-- /dev/pilot

und ebenso cdrecord:

Ausgabe von cdrecord -scanbus als User:

Cdrecord-Clone-dvd 2.01a27 (i686-suse-linux) Copyright (C) 1995-2004 Jörg
Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to
http://www.suse.de/feedback
Note: The author of cdrecord should not be bothered with problems in this
version.
Linux sg driver version: 3.5.30
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version
(okir@suse.de-scsi-linux-sg.c-1.80-resmgr-patch '@(#)scsi-linux-sg.c  1.80
04/03/08 Copyright 1997 J. Schilling').
scsibus0:
        0,0,0     0) *
        0,1,0     1) *
        0,2,0     2) 'PLEXTOR ' 'CD-ROM PX-40TS  ' '1.14' Removable CD-ROM
        0,3,0     3) 'PLEXTOR ' 'CD-R   PX-W4012S' '1.04' Removable CD-ROM
cdrecord: Warning: controller returns wrong size for CD capabilities page.
        0,4,0     4) 'PIONEER ' 'DVD-ROM DVD-303 ' '1.10' Removable CD-ROM
        0,5,0     5) *
        0,6,0     6) *
        0,7,0     7) *

K3B brennt damit jetzt zufriedenstellend.

Munter bleiben: Jan Henning
 

bootmaker

Newbie
Moin!

ich habe das geiche Problem, jedoch helfen mir die Lösungen nicht weiter! Dier ein Ausszug aus meiner resmgr.conf

# CD-ROMs - giving permission to open the corresponding SCSI
# device is highly useful for CD writers such as cdrecord.
add /dev/cdrom desktop scsi paride
add /dev/cdrom1 desktop scsi paride
add /dev/cdrecorder desktop scsi
add /dev/dvd desktop scsi paride
add /dev/dvd1 desktop scsi paride
add /dev/sr0 desktop scsi
add /dev/sr1 desktop scsi
add /dev/sr2 desktop scsi
add /dev/sr3 desktop scsi

und das ist die Ausgabe die sie als user Produziert:

rw-- /dev/audio
rw-- /dev/mixer
rw-- /dev/dsp
rw-- /dev/sequencer
rw-- /dev/video
rw-- /dev/modem
rw-p /dev/cdrom
rw-p /dev/cdrom1
rw-- /dev/cdrecorder
rw-p /dev/dvd
rw-p /dev/dvd1
rw-- /dev/sr0
rw-- /dev/sr1
rw-- /dev/sr2
rw-- /dev/sr3
rws- /dev/scanner
r--- /dev/console
rw-- /dev/pilot

dann habe ich bei cdrecord --scanbus noch ein ganz anderen Fehler:

binder@galaxy:~> cdrecord -scanbus
ZY$�: Operation not permitted. WARNING: Cannot set RR-scheduler
ZY$�: Permission denied. WARNING: Cannot set priority using setpriority().
ZY$�: WARNING: This causes a high risk for buffer underruns.
Cdrecord-Clone-dvd 2.01a27 (i686-suse-linux) Copyright (C) 1995-2004 Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to http://www.suse.de/feedback
Note: The author of cdrecord should not be bothered with problems in this version.
cdrecord: No such file or directory. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

ls -l /usr/bin/cdrecord:
-rwxr-xr-x 1 root users 364570 2004-04-06 03:28 /usr/bin/cdrecord

Hat jemand eine Idee?? So ohne Brnnen ist es blöde :)

Greetz bOOt
 

oc2pus

Ultimate Guru
wenn ihr die Rechte manuell manipuliert, werden sie bei JEDEM SuseConfig wieder mit denen aus /etc/permissions/{easy,securre} überschrieben.

Lösung:
in /etc/permissions.local die gewünschten Rechte eintragen, dann passiert das nicht ;)
 
Oben