Bug 88512
Summary: | problems if other sgX not writeable | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Gérard Milmeister <gemi> | ||||||
Component: | nautilus-cd-burner | Assignee: | Alexander Larsson <alexl> | ||||||
Status: | CLOSED DUPLICATE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 9 | CC: | john, paulw | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2006-02-21 18:52:36 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Gérard Milmeister
2003-04-10 16:31:42 UTC
kudzu is suppoed to make a /dev/cdwriter symlink, and cdwriter is listed in /etc/security/console.perms, so a console login should have gotten write permissions to the cd writer. Didn't this happen? I have lrwxrwxrwx 1 root root 8 Apr 8 04:21 cdwriter -> /dev/sg1 crw------- 1 gemi disk 21, 1 Jan 30 11:24 /dev/sg1 and in console.perms <cdrom>=/dev/cdrom* /dev/cdroms/* /dev/cdwriter* /mnt/cdrom* so this seems to be ok, but the error output is: cdrecord: For possible transport specifiers try 'cdrecord dev=help'. cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root. cdrecord: Permission denied. Cannot open '/dev/sg0'. Cannot open SCSI driver. scsibus: 1 target: 0 lun: 0 scsidev: '1,0,0' cdrecord: WARNING: This causes a high risk for buffer underruns. cdrecord: Permission denied. WARNING: Cannot set priority using setpriority(). cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler cdrecord: WARNING: This causes a high risk for buffer underruns. cdrecord: Operation not permitted. WARNING: Cannot do mlockall(2). Here, the problem is /dev/sg0 instead of /dev/sg1. I also had the impression, that in order to access the CD-Writer via scsi commands, cdrecord would have to be run as root, and that making the device writable would not be sufficient. Also, why must gtoaster be run still as root? I think I found the problem. cdrecord -scanbus displays: scsibus0: 0,6,0 6) 'IOMEGA ' 'ZIP 100 ' 'J.03' Removable Disk scsibus1: 1,0,0 100) 'PLEXTOR ' 'CD-R PX-320A ' '1.05' Removable CD-ROM scanbus seems to scan one scsi device after another. However the first one (zip drive /dev/sg0) has no user privileges (but /dev/sda) has, so it seems that the second one (/dev/sg1) is not found by cdrecord. If I set the required permissions on /dev/sg0, the burning works! So /dev/sg0 must also be present in console.perms. BTW when are the permission from console.perms set? Hmmm. I don't get it, the fact that it couldn't open /dev/sg0 shouldn't matter. Well, it might warn some, but the actual writing is to sg1, which should work. And indeed, after the sg0 warning it prints "scsidev: '1,0,0'", which is right. You only need to be root to set realtime priority, which isn't strictly necessary. Especially on modern machines. Well I changed back to: crw-rw---- 1 root disk 21, 0 Jan 30 11:24 /dev/sg0 I attach a screenshot of a session. Created attachment 91192 [details]
output of nautilus-cd-burner
Strange, but i think it should be fixable. The problem is with the way cdrecord works. If /dev/sg0 is a SCSI drive (e.g. sda) and /dev/sg1 is the cdwriter then cdrecord requires permission to sg0 (i.e. the hard drive) when it writes to sg1. This is true when it is invoked as cdrecord dev=x,x,x [whatever] But if it is invoked as cdrecord dev=/dev/sg1:x,x,x [whatever] then it works without needing access to sg0! Apparently without the devicename is accesses sg* in order and quits if it does not have permission. At least I have tested this with the commands cdrecord dev=1,0,0 driveropts=help -checkdrive and cdrecord dev=/dev/sg1:1,0,0 driveropts=help -checkdrive The fix for nautilus-cd-burner should be to use cdrecord with dev=<devicename>:scsibus,target,lun instead of just dev=scsibus,target,lun. Created attachment 92633 [details]
Patch for nautilus-cd-burner-0.4.3 (from rawhide)
This is a patch to the version of nautilus-cd-burner from rawhide. I think it
fixes the problem that requires a user to have permissions to /dev/sg* if the
cdwriter is /dev/sgx where x > 0. I have not tested this much. Use at your
own risk!
A similar change could be made to the RH9 version of nautilus-cd-burner to get
it to work for non-root users when a SCSI hard drive is present.
Comment on attachment 92633 [details]
Patch for nautilus-cd-burner-0.4.3 (from rawhide)
The attachment was bad I deleted it.
This bug is a duplicate of 90656 which has been fixed and closed. Installation of the current rawhide version of cdrecord will solve the problem. What? 90656 is a amd64 SATA bug, it doesn't seem related at all. Did you mean another bug? Sorry, that should have been bug #90565. *** This bug has been marked as a duplicate of 90565 *** Changed to 'CLOSED' state since 'RESOLVED' has been deprecated. |