Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2005 09:08:17 -0600
From:      David Kelly <dkelly@hiwaay.net>
To:        FreeBSD-Questions@FreeBSD.org
Subject:   devfs and bpf owner, group, and mode
Message-ID:  <20051108150817.GA47825@Grumpy.DynDNS.org>

next in thread | raw e-mail | index | archive | help
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.

So where is the 'i' that I've failed to dot?

-- 
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051108150817.GA47825>