LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Cant write with CDRW (https://www.linuxquestions.org/questions/linux-general-1/cant-write-with-cdrw-131065/)

Gates1026 01-03-2004 12:42 AM

Cant write with CDRW
 
I am using slackware 9.1 and cant quite get my CD writer up and running. When I try to write to a cd using gnome toaster, I get this message:

"cdrecord: Permission denied. Cannot open '/dev/sg0'. Cannot open SCSI driver"

Here is my output of lsmod

root@Ryan:/home/ryan# lsmod
Module Size Used by Tainted: P
emu10k1 57096 2 (autoclean)
sound 55636 0 (autoclean) [emu10k1]
ac97_codec 12296 0 (autoclean) [emu10k1]
soundcore 3332 7 (autoclean) [emu10k1 sound]
nvidia 1628576 11 (autoclean)
keybdev 1952 0 (unused)
mousedev 4244 1
hid 21156 0 (unused)
usbmouse 2008 0 (unused)
input 3200 0 [keybdev mousedev hid usbmouse]
usb-storage 65536 0 (unused)
parport_pc 14724 0
parport 23264 0 [parport_pc]
uhci 24496 0 (unused)
usbcore 58400 1 [hid usbmouse usb-storage uhci]
tulip 40928 1
crc32 2880 0 [tulip]
emu10k1-gp 1352 0 (unused)
gameport 1452 0 [emu10k1-gp]
pcmcia_core 40032 0
ide-scsi 94
agpgart 39576 3

I am using ide-scsi emulation through the lilo boot loader. Here is the line from my fstab:

/dev/scd0 /mnt/cdrom iso9660 noauto,user,ro 0 0

Here is my output of cdrecord -scanbus
Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J�rg Schilling
Linux sg driver version: 3.1.25
Using libscg version 'schily-0.7'
scsibus0:
0,0,0 0) 'TDK ' 'CDRW5201B ' 'Q7B2' Removable CD-ROM
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *
scsibus1:
1,0,0 100) 'Generic ' 'USB Flash Disk ' '2.02' Removable Disk
1,1,0 101) *
1,2,0 102) *
1,3,0 103) *
1,4,0 104) *
1,5,0 105) *
1,6,0 106) *

Can anyone see what I am doing wrong so that I can use my cdwriter in peace??? Thanks in advance for the help :)

homey 01-03-2004 12:52 AM

What's your line in lilo.conf look like? I'm using grub at the moment but should be similar and mine looks like this.... hdc=ide-scsi

Are you able to record from the command line?
cdrecord -v speed=4 dev=0,0,0 filename.iso

Edit: I just noticed something...
Quote:

user,ro 0 0
You may need to change that for users to have write access

Gates1026 01-03-2004 01:03 AM

here is what is at the end of my lilo.conf file

append = "hdc=ide-scsi"

I tried your command line as my user "ryan" and it gave me the same error. I tried it as root and it worked just fine. You know of any way to be able to do this as a normal user without having root permissions so I can use a GUI program to burn my cd's?

thegeekster 01-03-2004 01:13 AM

I think what homey what trying to say is to change the option 'user' to 'users' (make it plural) in fstab

homey 01-03-2004 01:15 AM

Try changing the fstab....
/dev/scd0 /mnt/cdrom iso9660 noauto,user,rw 0 0

Just guessing here as I haven't made any cdroms as a user.

HappyTux 01-03-2004 01:15 AM

Quote:

Originally posted by Gates1026
here is what is at the end of my lilo.conf file

append = "hdc=ide-scsi"

I tried your command line as my user "ryan" and it gave me the same error. I tried it as root and it worked just fine. You know of any way to be able to do this as a normal user without having root permissions so I can use a GUI program to burn my cd's?

Have you checked the permissions on the /dev/sg* devices they have to be read/write to the owner and the group that has permission to access the devices in Debian the owner is root and the group cdrom and the user has to be in the cdrom group to use the device. What it looks like:

Code:

[12:13 AM Sat Jan 03: stephen @ ~]
>$ ls -l /dev/sg*
crw-rw----    1 root    cdrom    21,  0 2002-03-14 17:51 /dev/sg0
crw-rw----    1 root    cdrom    21,  1 2002-03-14 17:51 /dev/sg1
crw-rw----    1 root    cdrom    21,  10 2002-03-14 17:51 /dev/sg10

snip ..

To find the groups:
Code:

[12:13 AM Sat Jan 03: stephen @ ~]
>$ groups
stephen adm lp dialout cdrom floppy audio dip src video


Gates1026 01-03-2004 01:25 AM

I tried to set my fstab to users and that didnt work. I still get the cdrecord: Permission denied. Cannot open '/dev/sg0'. Cannot open SCSI driver. error when trying to write to a cd.

as for teh permissions, I have this

crw------- 1 root root 21, 0 Apr 12 1999 sg0

here is the output of the groups command......I dont have a cdrom option

root@Ryan:/dev# groups
root bin daemon sys adm disk wheel floppy

Gates1026 01-03-2004 01:25 AM

I tried to set my fstab to users and that didnt work. I still get the cdrecord: Permission denied. Cannot open '/dev/sg0'. Cannot open SCSI driver. error when trying to write to a cd.

as for teh permissions, I have this

crw------- 1 root root 21, 0 Apr 12 1999 sg0

here is the output of the groups command......I dont have a cdrom option

root@Ryan:/dev# groups
root bin daemon sys adm disk wheel floppy

homey 01-03-2004 01:33 AM

Ok I did try it with user and it works. This is what my fstab looks like. My os is Redhat, don't know if that makes a difference tho.

/dev/scd0 /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0

thegeekster 01-03-2004 01:43 AM

Something I noticed is that cdrecord is looking for /dev/sg0, yet the block device being mounted in fstab is /dev/scd0..........run this command and see if /dev/scd0 is being linked to anything:

ls -l /dev |grep -i scd0

Also, in my slack box, sg0 is a character device, not a block device........the default group for a block device is 'disk' in slack

Gates1026 01-03-2004 11:28 AM

looks likethe permissions for group are set at "disk" like you said they should be. When I do ln -s it wont let me do a link b/c both files exist already. I am not too familiar with ln -s, so did I do it right?
root@Ryan:/dev# ln -s /dev/sr0 /dev/sg0
I even tried it the other way around with /dev/sr0 last and sg0 first and it did the same thing. The reason I am using sr0 now is that my dmesg shows that as what is setup at boot. Does anyone have any ideas? I am going crazy not being able to figure this out!

thegeekster 01-03-2004 03:20 PM

I would first find out why cdrecord is looking for a character device, not a block device......a character device is usually associated with monitors and screens, block devices are usually associated with disks. So, shouldn't cdrecord should be looking for sr0, not sg0?

As for symlinking, the syntax is to name where the link points to and then name the link if needed (the square brackets [] indicate an optional argument and is not used in the argument):

ln -s <link points here> [<name of link>]

If you don't specify the name of the link, it will take the name of the file or directory it is pointing to. I don't think you can replace a file with a link, even if you force it. You can only force it if the file being replaced is a link, too. To force it, you would use the -f option. So for a symlink you would specify:

ln -sf <link points here> [<name of link>]

thegeekster 01-03-2004 11:16 PM

Re: Cant write with CDRW
 
Quote:

Originally posted by Gates1026
..."cdrecord: Permission denied. Cannot open '/dev/sg0'. Cannot open SCSI driver"...
I just discovered something interesting about that err msg. When I did a 'cdrecord -scanbus' command as a normal _user_, here's the output:
Code:

$ cdrecord -scanbus
Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
cdrecord: Permission denied. Cannot open '/dev/sg0'. 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'.

From this, it seems that gnome toaster is running cdrecord with only user permissions and might need to run it as root.............I don't know if this means anything since I'm not familiar with how gnome toaster works.

Running the -scanbus command as root gave me this:
Code:

# cdrecord -scanbus
Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
Linux sg driver version: 3.1.25
Using libscg version 'schily-0.7'
scsibus0:
        0,0,0    0) 'SAMSUNG ' 'CD-R/RW SW-248F ' 'R603' Removable CD-ROM
        0,1,0    1) *
        0,2,0    2) *
        0,3,0    3) *
        0,4,0    4) *
        0,5,0    5) *
        0,6,0    6) *
        0,7,0    7) *


Gates1026 01-03-2004 11:24 PM

Does anyone know of a way to be able to run gnome toaster with root permissions? If not does anyone know of a cd writer program that can burn mp3 to wav, iso, and data cd's? Thanks for all of the help!

thegeekster 01-04-2004 12:25 AM

As for gnome toaster, check out this Warning on its download page. Has some info about submitting bugs

X-CD-Roast might be a worth checking out. Haven't used it, but I've heard a few good things about it. :)


All times are GMT -5. The time now is 09:42 PM.