# cdrecord runs in root only [solved]

## StarDragon

I'm getting this error when I run cdrecord as a regular user:

```
cdrecord dev=/dev/hdc -data file
```

```
cdrecord: Operation not permitted. Cannot send SCSI via ioctl.

cdrecord: Operation not permitted. Cannot open or use SCSI driver.
```

Last edited by StarDragon on Tue Jan 22, 2008 5:48 pm; edited 1 time in total

----------

## BradN

Have you added the user to the cdrom and cdrw groups?

----------

## StarDragon

Unfortunately yeah. I've already checked that.

----------

## piewie

-rwsr-xr-x 1 root cdrw 446226 2007-10-24 11:45 /usr/bin/cdrecord

----------

## StarDragon

 *piewie wrote:*   

> -rwsr-xr-x 1 root cdrw 446226 2007-10-24 11:45 /usr/bin/cdrecord

 

Yup, done that too.

note: on second thought what if I try this.

```
cdrecord -dev=/dev/cdrw -data file
```

If anyone has success with that let me know.  :Smile: 

----------

## piewie

```
cdrecord: Operation not permitted. Cannot send SCSI via ioctl.

cdrecord: Operation not permitted. Cannot open or use SCSI driver.
```

Is a classical permission problem. Recheck your permission settings including /etc/groups

```
cdrecord -scanbus

cdrecord dev=ATA -scanbus

cdrecord dev=1,1,0 -data file.iso

cdrecord dev=ATA:1,1,0 -data file.iso
```

I would suggest to switch to the new PATA chipset driver to get back to scsi.

----------

## StarDragon

This is what I get:

```
# cdrecord -scanbus

Cdrecord-ProDVD-ProBD-Clone 2.01.01a34 (i686-pc-linux-gnu) Copyright (C) 1995-2007 JÃ¶rg Schilling

Linux sg driver version: 3.5.27

Using libscg version 'schily-0.9'.

scsibus1001:

        1001,0,0 100100) 'Slimtype' 'DVDRW SOSW-852S ' 'PSD1' Removable CD-ROM

        1001,1,0 100101) *

        1001,2,0 100102) *

        1001,3,0 100103) *

        1001,4,0 100104) *

        1001,5,0 100105) *

        1001,6,0 100106) *

        1001,7,0 100107) *

```

When I do this, I get: 

```
$ cdrecord -tao -v dev=1001,0,0 -data picture

Cdrecord-ProDVD-ProBD-Clone 2.01.01a34 (i686-pc-linux-gnu) Copyright (C) 1995-2007 JÃ¶rg Schilling

TOC Type: 1 = CD-ROM

cdrecord: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).

cdrecord: WARNING: This causes a high risk for buffer underruns.

cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler

cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().

cdrecord: WARNING: This causes a high risk for buffer underruns.

scsidev: '1001,0,0'

scsibus: 1001 target: 0 lun: 0

cdrecord: Permission denied. Cannot open '/dev/hda'. Cannot open or use SCSI driver.

cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.

cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

```

Btw, I have a feeling it's the burner driver:  :Sad: 

```
$ cdrecord -tao -v dev=/dev/cdrw -data picture

Cdrecord-ProDVD-ProBD-Clone 2.01.01a34 (i686-pc-linux-gnu) Copyright (C) 1995-2007 JÃ¶rg Schilling

TOC Type: 1 = CD-ROM

cdrecord: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).

cdrecord: WARNING: This causes a high risk for buffer underruns.

cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler

cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().

cdrecord: WARNING: This causes a high risk for buffer underruns.

scsidev: '/dev/cdrw'

devname: '/dev/cdrw'

scsibus: -2 target: -2 lun: -2

Warning: Open by 'devname' is unintentional and not supported.

Linux sg driver version: 3.5.27

Using libscg version 'schily-0.9'.

SCSI buffer size: 64512

atapi: 1

Device type    : Removable CD-ROM

Version        : 0

Response Format: 2

Capabilities   : 

Vendor_info    : 'Slimtype'

Identifikation : 'DVDRW SOSW-852S '

Revision       : 'PSD1'

Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.

Current: CD-R

Profile: DVD+R/DL 

Profile: DVD+R 

Profile: DVD+RW 

Profile: DVD-RW sequential recording 

Profile: DVD-RW restricted overwrite 

Profile: DVD-R sequential recording 

Profile: DVD-ROM 

Profile: CD-RW 

Profile: CD-R (current)

Profile: CD-ROM 

cdrecord: Warning: controller returns wrong page 3 for Ricoh Vendor Page page (30).

Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).

Driver flags   : MMC-3 SWABAUDIO BURNFREE 

Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R

Drive buf size : 1422080 = 1388 KB

FIFO size      : 4194304 = 4096 KB

Track 01: data     4 MB        

Total size:        4 MB (00:29.69) = 2227 sectors

Lout start:        5 MB (00:31/52) = 2227 sectors

cdrecord: Operation not permitted. Cannot send SCSI cmd via ioctl.

cdrecord: Operation not permitted. Cannot open or use SCSI driver.

cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.

cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

```

----------

## piewie

Do you have:

```
brw-rw---- 1 root cdrom 11, 2 2008-01-07 09:47 /dev/hda
```

cdrecord -tao -v dev=ATA:1001,0,0 -data picture

What gives ls -l /usr/bin/cdrecord?

----------

## StarDragon

No luck:

```
$ cdrecord -tao dev=ATA:1001,0,0 -data picture

Cdrecord-ProDVD-ProBD-Clone 2.01.01a34 (i686-pc-linux-gnu) Copyright (C) 1995-2007 JÃ¶rg Schilling

cdrecord: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).

cdrecord: WARNING: This causes a high risk for buffer underruns.

cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler

cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().

cdrecord: WARNING: This causes a high risk for buffer underruns.

scsidev: 'ATA:1001,0,0'

devname: 'ATA'

scsibus: 1001 target: 0 lun: 0

Warning: Using badly designed ATAPI via /dev/hd* interface.

cdrecord: Permission denied. Cannot open '/dev/hda'. Cannot open or use SCSI driver.

cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.

cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

$ ls -al /usr/bin/cdrecord

-rwxr-xr-x 1 root cdrw 300660 Jan  4 18:37 /usr/bin/cdrecord

```

I even changed permissions on /dev/hdc, which is my cdrw drive:

```
# ls -al /dev/hdc

brw-rw---- 1 root cdrw 22, 0 Jan  7 12:07 /dev/hdc
```

edit: I speculate is has something to do with the cdrw/dvdrw drive. It's one of those fancy swanzy pieces of equipment, so it probably has to be run from root. I implemented a sudo command on graveman, and now it works beautifully well.  :Smile: 

edit: yeah, now I'm really sure it's the drive. When my wife first got it she had to return it back to the manufacturer, they never were able to fix it. I'm closing this as solved.

----------

