From owner-freebsd-scsi Sun Jul 26 21:07:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA03424 for freebsd-scsi-outgoing; Sun, 26 Jul 1998 21:07:39 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from panzer.plutotech.com (ken@panzer.plutotech.com [206.168.67.125]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA03400 for ; Sun, 26 Jul 1998 21:07:24 -0700 (PDT) (envelope-from ken@panzer.plutotech.com) Received: (from ken@localhost) by panzer.plutotech.com (8.8.8/8.8.5) id WAA22661; Sun, 26 Jul 1998 22:06:51 -0600 (MDT) From: "Kenneth D. Merry" Message-Id: <199807270406.WAA22661@panzer.plutotech.com> Subject: Re: non-root pass, symlinks to pass fail In-Reply-To: from Cory Kempf at "Jul 26, 98 08:38:56 pm" To: ckempf@enigami.com (Cory Kempf) Date: Sun, 26 Jul 1998 22:06:51 -0600 (MDT) Cc: freebsd-scsi@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28s (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Cory Kempf wrote... > If I attempt to use cam_scsi_open() on one of the /dev/pass devices as a > non-root user, it failes with errno 13 (access). > > Interestingly enough, though, ls -l /dev/pass* produces: > > 0 brw-rw-rw- 1 root operator 200, 0 Jul 14 16:50 /dev/pass0 > 0 brw-rw-rw- 1 root operator 200, 1 Jul 14 16:50 /dev/pass1 > 0 brw-rw-rw- 1 root operator 200, 2 Jul 14 16:50 /dev/pass2 > 0 brw-rw-rw- 1 root operator 200, 3 Jul 14 16:50 /dev/pass3 > 0 brw-rw-rw- 1 root operator 200, 4 Jul 14 16:50 /dev/pass4 > > As I chmod'd things to 666 when I first got the error. > > Why can't I open a pass device as a non-root user? Probably because you're chmoding the wrong devices. First off, there is no "cam_scsi_open()" function. My guess is that you're using cam_open_device(). All of the cam_open_* functions open the passthrough character devices, not the block devices. So changing permissions on the block devices doesn't make any difference. As for why there are block passthrough devices, it's a thought towards future read/write functionality. Kinda hard to explain, though, without a huge discussion. > On what might be a related note, I created a symlink (i.e. ln -s) to a > pass device. cam_scsi_open() refuses to open that either. Why? > > And, in both cases, how do I fix? See above. I think you're looking at the wrong devices. You should be looking at /dev/rpass*. Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message