Hi, trying to run "cdrwtool -d /dev/cdrecorder -q" works fine as root, but fails as normal user with: using device /dev/cdrecorder wait_cmd: Operation not permitted Command failed: 5c 00 00 00 00 00 00 00 0c 00 00 00 - sense 00.00.00 can't unlock door I've set all permissions to 666 (likely some that I shouldn't, like control): wirth /root# ls -la /dev/pktcdvd* brw-rw-rw- 1 root root 254, 0 2004-09-01 15:18 /dev/pktcdvd0 /dev/pktcdvd: total 116 drwxr-xr-x 2 root root 96 2004-09-02 10:47 . drwxr-xr-x 35 root root 118600 2004-09-01 17:00 .. crw-rw-rw- 1 root root 10, 63 2004-09-01 15:18 control brw-rw-rw- 1 root root 254, 0 2004-09-02 10:47 mycd But it still fails. Any chance to do this as user? This is with kernel 2.6.8.1 and udftools 1.0.0b3 cu, Frank -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049
On Thu, Sep 02 2004, Frank Steiner wrote:
Hi,
trying to run "cdrwtool -d /dev/cdrecorder -q" works fine as root, but fails as normal user with:
using device /dev/cdrecorder wait_cmd: Operation not permitted Command failed: 5c 00 00 00 00 00 00 00 0c 00 00 00 - sense 00.00.00 can't unlock door
I've set all permissions to 666 (likely some that I shouldn't, like control):
wirth /root# ls -la /dev/pktcdvd* brw-rw-rw- 1 root root 254, 0 2004-09-01 15:18 /dev/pktcdvd0
/dev/pktcdvd: total 116 drwxr-xr-x 2 root root 96 2004-09-02 10:47 . drwxr-xr-x 35 root root 118600 2004-09-01 17:00 .. crw-rw-rw- 1 root root 10, 63 2004-09-01 15:18 control brw-rw-rw- 1 root root 254, 0 2004-09-02 10:47 mycd
But it still fails. Any chance to do this as user? This is with kernel 2.6.8.1 and udftools 1.0.0b3
You need a newer kernel, then it works for a user if you have write permissions on the device. -- Jens Axboe
Jens Axboe wrote:
But it still fails. Any chance to do this as user? This is with kernel 2.6.8.1 and udftools 1.0.0b3
You need a newer kernel, then it works for a user if you have write permissions on the device.
Just for interest: Is there a certain patch about this? I first thought it was related to the command filtering, but my debugging messages that I used to figure out the neccessary commands for cdrecord/dvd+rw-tools didn't tell me it had blocked a command... -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049
On Mon, Sep 06 2004, Frank Steiner wrote:
Jens Axboe wrote:
But it still fails. Any chance to do this as user? This is with kernel 2.6.8.1 and udftools 1.0.0b3
You need a newer kernel, then it works for a user if you have write permissions on the device.
Just for interest: Is there a certain patch about this? I first thought it was related to the command filtering, but my debugging messages that I used to figure out the neccessary commands for cdrecord/dvd+rw-tools didn't tell me it had blocked a command...
it is related to command filtering, maybe your debug messages are wrong. -- Jens Axboe
Jens Axboe wrote:
it is related to command filtering, maybe your debug messages are wrong.
I mixed two kernel versions up, sorry for that. The kernel that produced the error messages was not correctly patched, so it was filtering as you assumed. However, with 2.6.8.1 and the cd writing patch applied as well as with 2.6.9-rc1-bk12 I now get a different error message: zassenhaus [12:44] fst 102) cdrwtool -d /dev/pktcdvd/mycd -q using device /dev/pktcdvd/mycd set_options can't unlock door /var/log/messages contains this: Sep 6 12:44:57 zassenhaus /etc/hotplug/block.agent[8796]: new block device /block/pktcdvd0 Sep 6 12:45:05 zassenhaus kernel: cdrom: hdd: mmc-3 profile capable, current profile: Ah Sep 6 12:45:05 zassenhaus kernel: pktcdvd: Unknown ioctl for pktcdvd0 (5326) Sep 6 12:45:05 zassenhaus kernel: pktcdvd: Unknown ioctl for pktcdvd0 (5329) Sep 6 12:45:05 zassenhaus kernel: pktcdvd: Unknown ioctl for pktcdvd0 (5320) I've called "pktsetup mycd /dev/hdd" before and /dev looks like this: zassenhaus /root# ls -lar /dev/pktcdvd* brw------- 1 root root 254, 0 2004-09-01 14:18 /dev/pktcdvd0 /dev/pktcdvd: total 114 brw-r----- 1 fst root 254, 0 2004-09-06 12:44 mycd crw-r--r-- 1 root root 10, 63 2004-09-01 14:18 control drwxr-xr-x 35 root root 116920 2004-09-06 12:44 .. drwxr-xr-x 2 root root 96 2004-09-06 12:44 . That happens with a NEC ND-1300A and a PlexWriter W5224TA. Anything else I can try? cu, Frank -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049
On Monday 06 Sep 2004 10:55, Frank Steiner wrote:
Jens Axboe wrote:
it is related to command filtering, maybe your debug messages are wrong.
I mixed two kernel versions up, sorry for that. The kernel that produced the error messages was not correctly patched, so it was filtering as you assumed.
However, with 2.6.8.1 and the cd writing patch applied as well as with 2.6.9-rc1-bk12 I now get a different error message:
zassenhaus [12:44] fst 102) cdrwtool -d /dev/pktcdvd/mycd -q using device /dev/pktcdvd/mycd set_options can't unlock door
/var/log/messages contains this: Sep 6 12:44:57 zassenhaus /etc/hotplug/block.agent[8796]: new block device /block/pktcdvd0 Sep 6 12:45:05 zassenhaus kernel: cdrom: hdd: mmc-3 profile capable, current profile: Ah Sep 6 12:45:05 zassenhaus kernel: pktcdvd: Unknown ioctl for pktcdvd0 (5326) Sep 6 12:45:05 zassenhaus kernel: pktcdvd: Unknown ioctl for pktcdvd0 (5329) Sep 6 12:45:05 zassenhaus kernel: pktcdvd: Unknown ioctl for pktcdvd0 (5320)
I've called "pktsetup mycd /dev/hdd" before and /dev looks like this:
zassenhaus /root# ls -lar /dev/pktcdvd* brw------- 1 root root 254, 0 2004-09-01 14:18 /dev/pktcdvd0
/dev/pktcdvd: total 114 brw-r----- 1 fst root 254, 0 2004-09-06 12:44 mycd crw-r--r-- 1 root root 10, 63 2004-09-01 14:18 control drwxr-xr-x 35 root root 116920 2004-09-06 12:44 .. drwxr-xr-x 2 root root 96 2004-09-06 12:44 .
That happens with a NEC ND-1300A and a PlexWriter W5224TA.
Anything else I can try?
cu, Frank
-- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049
Frank, I see you are specifying the packet device as an argument to cdrwtool. When I use cdrwtool, I use the "real" device, so my call would look like: cdrwtool -d /dev/hdc -q Chris
Chris Clayton wrote:
Frank,
I see you are specifying the packet device as an argument to cdrwtool. When I use cdrwtool, I use the "real" device, so my call would look like:
cdrwtool -d /dev/hdc -q
Oh my goodness! Now I've really mixed things up :-) When I ran into the problem with my kernel that was blocking the commands with filtering, I tried around and around and checked several things. I guess at one point I tried to use the /dev/pktcdvd instead of /dev/cdrecorder (linked to /dev/hdd), and when I was now back to the kernel which was not filtering out the scsi commands anymore, I used that command from the history instead of the one using the real device and I didn't really check was I was executing there. Of course you are right! And now that filtering is ok, I can format a cd as user, specifying the real device with "cdrwtool -d /dev/cdrecorder -q". Thanks a lot, and sorry for bothering :-) cu, Frank -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049
participants (3)
-
Chris Clayton
-
Frank Steiner
-
Jens Axboe