LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-22-2006, 07:41 AM   #1
bunnyknight13
Member
 
Registered: Aug 2004
Location: Virginia
Distribution: Lunar Linux
Posts: 57

Rep: Reputation: 15
k3b wont burn when running as a user


I'm trying to burn a Data CD as a nonpriviledged user with k3b and it gives me an error message. It also doesn't work when burning with SUID set for /usr/bin/cdrecorder

This is the debug output from k3b(/usr/bin/cdrecorder doesn't have SUID set)
Code:
System
-----------------------
K3b Version: 0.12.15

KDE Version: 3.5.2
QT Version:  3.3.5
Kernel:      2.6.16
Devices
-----------------------
HL-DT-ST CD-RW GCE-8160B 2.01 (/dev/hdc, ) at /mnt/cdrom [CD-R; CD-RW; CD-ROM] [CD-ROM; CD-R; CD-RW] [SAO; TAO; RAW; SAO/R96P; SAO/R96R; RAW/R16; RAW/R96P; RAW/R96R]

DVDROM 8 X 40 (/dev/hdd, ) at /mnt/dvd [CD-ROM; DVD-ROM] [Error] [None]
K3b
-----------------------
Size of filesystem calculated: 358519

Used versions
-----------------------
cdrecord: 2.1.1a04

cdrecord
-----------------------
/usr/bin/cdrecord: Warning: Running on Linux-2.6.16
/usr/bin/cdrecord: There are unsettled issues with Linux-2.5 and newer.
/usr/bin/cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
/usr/bin/cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
/usr/bin/cdrecord: WARNING: This causes a high risk for buffer underruns.
/usr/bin/cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
/usr/bin/cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
/usr/bin/cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
SCSI buffer size: 64512
Cdrecord-Clone 2.01.01a04 (i686-pc-linux-gnu) Copyright (C) 1995-2006 Jörg Schilling
TOC Type: 1 = CD-ROM
Using libscg version 'schily-0.8'.
Driveropts: 'burnfree'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'HL-DT-ST'
Identifikation : 'CD-RW GCE-8160B '
Revision       : '2.01'
Device seems to be: Generic mmc CD-RW.
Current: 0x0009
Profile: 0x000A 
Profile: 0x0009 (current)
Profile: 0x0008 
Profile: 0x0002 (current)
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-2 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 1971200 = 1925 KB
FIFO size      : 4194304 = 4096 KB
/usr/bin/cdrecord: Operation not permitted. Cannot send SCSI cmd via ioctl
Track 01: data   700 MB        
Total size:      804 MB (79:40.25) = 358519 sectors
Lout start:      804 MB (79:42/19) = 358519 sectors

cdrecord command:
-----------------------
/usr/bin/cdrecord -v gracetime=2 dev=/dev/hdc speed=16 -dao driveropts=burnfree -eject -data -tsize=358519s - 

mkisofs
-----------------------
358519

mkisofs command:
-----------------------
/usr/bin/mkisofs -gui -graft-points -volid K3b data project -volset  -appid K3B THE CD KREATOR (C) 1998-2005 SEBASTIAN TRUEG AND THE K3B TEAM -publisher  -preparer  -sysid LINUX -volset-size 1 -volset-seqno 1 -sort /tmp/kde-luna/k3btYxpMb.tmp -rational-rock -hide-list /tmp/kde-luna/k3bXYGusa.tmp -joliet -hide-joliet-list /tmp/kde-luna/k3bDiv7Yb.tmp -full-iso9660-filenames -iso-level 2 -path-list /tmp/kde-luna/k3bqqjRcc.tmp
 
Old 04-22-2006, 08:04 AM   #2
dannystaple
Member
 
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121

Rep: Reputation: 15
Hmm - on at least a few distros, there is a group which has permission for burning CDs/DVD's. You should take a look to see if your distro has the group and make sure that this nonprivileged user is at least a member of that group. Basically the group is one that has write permissions to the device that corresponds to your burner - ie /dev/hdc/.

Cheers,
Danny
 
Old 04-22-2006, 08:38 AM   #3
Sören Schneider
Member
 
Registered: Apr 2005
Location: Brazil
Distribution: SUSE 9.0 Pro, SUSE OSS 10.0, KDE 3.4.2
Posts: 156

Rep: Reputation: 30
I had a similar problem.
My CD-Burner was mounted read-only
 
Old 04-22-2006, 11:12 AM   #4
bunnyknight13
Member
 
Registered: Aug 2004
Location: Virginia
Distribution: Lunar Linux
Posts: 57

Original Poster
Rep: Reputation: 15
Arg

neither have worked
 
Old 04-22-2006, 12:00 PM   #5
dannystaple
Member
 
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121

Rep: Reputation: 15
Hmm - I am wandering if permissions have anything to do with it. You say it does not burn even with SUID set. It you actually run kb as root, can you burn then?

Danny
 
Old 04-22-2006, 12:01 PM   #6
petespin27
Member
 
Registered: Aug 2005
Location: Lansing, IL
Distribution: Opensuse 11
Posts: 140

Rep: Reputation: 16
Try running k3bsetup. It will fix the permissions so that you can burn cds.
 
Old 04-22-2006, 12:08 PM   #7
bunnyknight13
Member
 
Registered: Aug 2004
Location: Virginia
Distribution: Lunar Linux
Posts: 57

Original Poster
Rep: Reputation: 15
I found a fix(but please tell me if there's something better)

-->I moved cdrecord to cdrecord-bin(still not sticky)
-->then made a new script called cdrecord:
Code:
#!/bin/bash
sudo cdrecord $@
exit
-->and changed the permissions to rx and suid and made luna the owner(luna is my guest user account)
-->then added the following lines to /etc/sudoers
Code:
Cmnd_Alias      CDRECORD        = /usr/bin/cdrecord-bin
luna    ALL= NOPASSWD:CDRECORD
---
It worked
 
Old 04-22-2006, 05:33 PM   #8
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Here's what I did:
1. Identify cdrecord executables

debian:~# ls -l /usr/bin/cdrecord*
-rwsr-xr-x 1 root root 133 Jan 10 10:15 /usr/bin/cdrecord
-rwxr-xr-x 1 root root 367320 Jan 10 10:15 /usr/bin/cdrecord.mmap
-rwxr-xr-x 1 root root 367352 Jan 10 10:15 /usr/bin/cdrecord.shm

2. Setuid

debian:~# chmod u+s /usr/bin/cdrecord
debian:~# chmod u+s /usr/bin/cdrecord.mmap
debian:~# chmod u+s /usr/bin/cdrecord.shm

3. Check for success

debian:~# ls -l /usr/bin/cdrecord*
-rwsr-xr-x 1 root root 133 Jan 10 10:15 /usr/bin/cdrecord
-rwsr-xr-x 1 root root 367320 Jan 10 10:15 /usr/bin/cdrecord.mmap
-rwsr-xr-x 1 root root 367352 Jan 10 10:15 /usr/bin/cdrecord.shm

I don't know if it was necessary to change them all, but it worked.
 
Old 04-22-2006, 07:02 PM   #9
Sören Schneider
Member
 
Registered: Apr 2005
Location: Brazil
Distribution: SUSE 9.0 Pro, SUSE OSS 10.0, KDE 3.4.2
Posts: 156

Rep: Reputation: 30
Login as ROOT and see if you can burn.
If not it's not a permission prob..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
k3b wont burn dual layer media etim Linux - Software 2 09-24-2005 08:05 PM
k3b recognises but wont burn dual layer dvd etim Linux - Software 3 01-07-2005 03:43 AM
k3b wont burn mp3s joeman3429 Fedora 4 09-30-2004 07:13 PM
k3b wont burn que/bin files treborblack Linux - Software 11 08-28-2004 11:58 PM
how to burn cd's with k3b as a normal user? zero79 Linux - Software 3 05-01-2004 12:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration