From owner-freebsd-questions@FreeBSD.ORG Wed Nov 9 14:28:27 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 E8AF116A41F for ; Wed, 9 Nov 2005 14:28:27 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail27.sea5.speakeasy.net (mail27.sea5.speakeasy.net [69.17.117.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB01E43D5F for ; Wed, 9 Nov 2005 14:28:23 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 28238 invoked from network); 9 Nov 2005 14:28:22 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail27.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 9 Nov 2005 14:28:21 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id E540C28441; Wed, 9 Nov 2005 09:28:20 -0500 (EST) Sender: lowell@be-well.ilk.org To: David Kelly References: <20051108150817.GA47825@Grumpy.DynDNS.org> From: Lowell Gilbert Date: 09 Nov 2005 09:28:20 -0500 In-Reply-To: <20051108150817.GA47825@Grumpy.DynDNS.org> Message-ID: <44wtjhaoaj.fsf@be-well.ilk.org> Lines: 45 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: FreeBSD-Questions@FreeBSD.org Subject: Re: devfs and bpf owner, group, and mode 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, 09 Nov 2005 14:28:28 -0000 David Kelly writes: > I'm having problems in 5.4 getting automatic ownership and mode correct > on /dev/bpf2. Added this to /etc/devfs.conf: > > # Allow group tcpdump to use bpf* > own bpf0 root:tcpdump > perm bpf0 0660 > own bpf1 root:tcpdump > perm bpf1 0660 > own bpf2 root:tcpdump > perm bpf2 0660 > > And this to /etc/devfs.rules: > > [devfsrules_bpf=5] > add path 'bpf*' mode 0660 group tcpdump > > The intent is to allow members of group "tcpdump" to use /dev/bpf2 > without being root. The above creates /dev/bpf[012] as desired at boot > but some time later /dev/bpf2 disappears. > > System has two NICs, xl0 and fxp0. At this time fxp0 is not being used. > Vlan0 is configured (as a VLAN of course) on xl0, and thats where I need > /dev/bpf2 for tcpdump to see what my stuff is doing. > > If missing, /dev/bpf2 is created automatically when tcpdump opens, but > its not created with the same ownership and mode as during reboot. > > Suspect my problem is related to [devfsrules_bpf=5] or the fact I > haven't informed the system to apply this rule to the /dev filesystem. Good guess. I'm still on my first cup of coffee, and might have taken a few more minutes to spot that. > So where is the 'i' that I've failed to dot? try adding 'devfs_system_ruleset="devfsrules_bpf"' to rc.conf. To apply it before reboot would be something roughly like 'devfs /dev ruleset devfsrules_bpf'. -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/