Bill Davidsen wrote:
Nick Sanders wrote:
For me when running growisofs with user permissions on 2.6.10 (ide-cd) it works perfectly 1st time but 2nd time fails with the error below. It works fine when run as root.

:-( unable to PREVENT MEDIA REMOVAL: Operation not permitted

As an aside audio cd burning with cdrecord works as long as the '-text' option isn't used, if it is the process hangs.


I reported a similar thing with cdrecord, writing a first session successfully using the -multi flag, but not being able to append to it or read the size with the "-msinfo" flag. I was totally blown off and told I didn't have permissions on the device, even though I was able to write to it.

I believe the true answer is that the SCSI command filter is blocking a command needed to perform the operation, probably a command to lock the door of the drive. In my case I have permissions to write the CD, just not to read the info needed to write additional sessions.


Hello,
Bill and Nick, could you try the attached patch that I sent to Jens Axboe yesterday? (You can see the mail with an explanation on
http://marc.theaimsgroup.com/?l=linux-kernel&m=110599420505734&w=2 )


Michal
--- linux-2.6.11-mm1/drivers/block/scsi_ioctl.c.orig	2005-01-17 20:42:40.000000000 +0100
+++ linux-2.6.11-mm1/drivers/block/scsi_ioctl.c	2005-01-17 20:43:14.000000000 +0100
@@ -197,9 +197,7 @@ static int verify_command(struct file *f
 	if (type & CMD_WRITE_SAFE) {
 		if (file->f_mode & FMODE_WRITE)
 			return 0;
-	}
-
-	if (!(type & CMD_WARNED)) {
+	} else if (!(type & CMD_WARNED)) {
 		cmd_type[cmd[0]] = CMD_WARNED;
 		printk(KERN_WARNING "scsi: unknown opcode 0x%02x\n", cmd[0]);
 	}

Reply via email to