From owner-freebsd-questions@FreeBSD.ORG Wed Jul 6 21:48:12 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0AA216A421 for ; Wed, 6 Jul 2005 21:48:12 +0000 (GMT) (envelope-from leblanc@keyslapper.net) Received: from russian-caravan.cloud9.net (russian-caravan.cloud9.net [168.100.1.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60BDC43D49 for ; Wed, 6 Jul 2005 21:48:12 +0000 (GMT) (envelope-from leblanc@keyslapper.net) Received: from russian-caravan.cloud9.net (localhost [127.0.0.1]) by russian-caravan.cloud9.net (Postfix) with SMTP id C6B6515611 for ; Wed, 6 Jul 2005 17:48:11 -0400 (EDT) Received: from keyslapper.net (250-119.customer.cloud9.net [168.100.250.119]) by russian-caravan.cloud9.net (Postfix) with ESMTP id 0942915604 for ; Wed, 6 Jul 2005 17:48:10 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by keyslapper.net (Postfix) with ESMTP id 69F411147A for ; Wed, 6 Jul 2005 17:48:10 -0400 (EDT) Received: from keyslapper.net ([127.0.0.1]) by localhost (keyslapper.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 68470-01 for ; Wed, 6 Jul 2005 17:48:10 -0400 (EDT) Received: by keyslapper.net (Postfix, from userid 1001) id 27F50114E6; Wed, 6 Jul 2005 17:48:10 -0400 (EDT) Date: Wed, 6 Jul 2005 17:48:10 -0400 From: Louis LeBlanc To: freebsd-questions@freebsd.org Message-ID: <20050706214809.GL42229@keyslapper.net> Mail-Followup-To: freebsd-questions@freebsd.org References: <20050706201141.GF42229@keyslapper.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a1QUDc0q7S3U7/Jg" Content-Disposition: inline In-Reply-To: <20050706201141.GF42229@keyslapper.net> X-PGP-Key: http://www.keyslapper.net/~leblanc/leblanc-at-keyslapper-net.asc User-Agent: Mutt/1.5.9i X-Virus-Scanned: amavisd-new at keyslapper.net X-AntiVirus: Checked by Vexira Antivirus v1.5 Subject: Re: devfs permissions wierdness X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2005 21:48:13 -0000 --a1QUDc0q7S3U7/Jg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 07/06/05 04:11 PM, Louis LeBlanc sat at the `puter and typed: > I have my devfs config set up to allow certain devices to be mounted > by users in the cdusers group as follows: >=20 > own da1 root:cdusers > perm da1 0660 > own da1a root:cdusers > perm da1a 0660 > own da1c root:cdusers > perm da1c 0660 > own da1s1 root:cdusers > perm da1s1 0660 >=20 > Problem is it doesn't work unless I go in as root and manually restart > the devfs facility with `/etc/rc.d/devfs restart` >=20 > Here's what I see: >=20 > # ls -l /dev/da1* =20 > crw-r----- 1 root operator 4, 27 Jun 26 23:02 /dev/da1 > crw-r----- 1 root operator 4, 29 Jun 26 23:02 /dev/da1a > crw-r----- 1 root operator 4, 30 Jun 26 23:02 /dev/da1c > crw-r----- 1 root operator 4, 31 Jun 26 23:02 /dev/da1cs1 > crw-r----- 1 root operator 4, 28 Jun 26 23:02 /dev/da1s1 > # /etc/rc.d/devfs restart > # ls -l /dev/da1* > crw-rw---- 1 root cdusers 4, 27 Jun 26 23:02 /dev/da1 > crw-rw---- 1 root cdusers 4, 29 Jun 26 23:02 /dev/da1a > crw-rw---- 1 root cdusers 4, 30 Jun 26 23:02 /dev/da1c > crw-r----- 1 root operator 4, 31 Jun 26 23:02 /dev/da1cs1 > crw-rw---- 1 root cdusers 4, 28 Jun 26 23:02 /dev/da1s1 > #=20 >=20 > Seems like this resets itself every now and again to the > root:operator/640 permissions too, and not just on reboot. >=20 > Anyone know what I'm missing? Well, I've uncovered a little more of this. The devices are created and destroyed each time the device is connected or disconnected. When they are created, the default permissions are used, not those I've configured. If I want my devfs permissions to be available, I have to restart devfs each time I connect a USB device. I tried setting a rule to fix this in /etc/devd.conf, but I don't think it works right. I added the following: attach 100 { device-name "da[0-9]*"; action "/etc/rc.d/devfs restart"; }; I was hoping this would simply restart devfs each time I connected a /dev/da* device, but this didn't work. I then tried changing the action to an explicit devfs rule command, as follows: action "devfs rule add path da* mode 660 group cdusers"; but this didn't do any better. Executing this action from the commandline didn't do what I wanted either, so I obviously have the syntax wrong. Since the first attempt didn't work, I suspect there are other errors in the config block that cause the whole thing to be skipped. Any pointers would be appreciated. Lou --=20 Louis LeBlanc FreeBSD-at-keyslapper-DOT-net Fully Funded Hobbyist, KeySlapper Extrordinaire :) Please send off-list email to: leblanc at keyslapper d.t net Key fingerprint =3D C5E7 4762 F071 CE3B ED51 4FB8 AF85 A2FE 80C8 D9A2 Cheops' Law: Nothing ever gets built on schedule or within budget. --a1QUDc0q7S3U7/Jg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCzFGZr4Wi/oDI2aIRArVrAJ0efGq/Pju2C4yUeh1Gelv73TkzFgCaA88L ZkF8rsDmr9yt1Vmtd/maNMA= =6vB5 -----END PGP SIGNATURE----- --a1QUDc0q7S3U7/Jg--