From owner-freebsd-questions@FreeBSD.ORG Wed Nov 10 19:52:31 2004 Return-Path: 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 202DF16A4CE for ; Wed, 10 Nov 2004 19:52:31 +0000 (GMT) Received: from crumpet.united-ware.com (ddsl-66-42-172-210.fuse.net [66.42.172.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 899B743D55 for ; Wed, 10 Nov 2004 19:52:30 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from [192.168.0.5] (adsl-68-250-184-205.dsl.wotnoh.ameritech.net [68.250.184.205]) (authenticated bits=0)iAAJXUUJ014132 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 10 Nov 2004 14:33:38 -0500 (EST) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: "Thordur Ivar B." Date: Wed, 10 Nov 2004 14:55:00 -0500 User-Agent: KMail/1.7 References: <20041109232851.50fe3154.thib@mi.is> <200411091850.03940.mistry.7@osu.edu> <20041110124108.37c3f4a9.thib@mi.is> In-Reply-To: <20041110124108.37c3f4a9.thib@mi.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1531171.v76QrLaAOG"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200411101455.07941.mistry.7@osu.edu> X-Spam-Status: No, hits=1.2 required=5.0 tests=J_CHICKENPOX_45, J_CHICKENPOX_55 autolearn=no version=2.64 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on crumpet.united-ware.com cc: freebsd-questions@freebsd.org Subject: Re: devfs + rulesets. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 19:52:31 -0000 --nextPart1531171.v76QrLaAOG Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 10 November 2004 07:41 am, you wrote: > On Tue, 9 Nov 2004 18:49:56 -0500 > > Anish Mistry wrote: > > On Tuesday 09 November 2004 06:28 pm, Thordur Ivar B. wrote: > > > Good day/night. > > > > > > I have been having some troubles with devfs (the config files that > > > is). > > > > > > Here is what I want todo: > > > I want to be able to allow users in group 'cdrom' to acces (rw) to > > > /dev/acd0 > > > > > > First of all i created the group ;). So far so good. > > > > > > Then i uncommented this line: > > > link acd0 cdrom > > > in /etc/devfs.conf (My only change in that file, so far). > > > > > > So far so good. > > > > > > Now heres where the trouble begins: I can by using the command line > > > utility (devfs) allow users in group cdrom to rw /dev/acd0{cdrom} > > > By issuing the following commands: > > > # devfs ruleset 10 > > > # devfs rule add path acd0 group cdrom > > > # devfs rule add path acd0 mode 0660 > > > # devfs rule applyset > > > > > > Here I have: > > > [thib@caulfield thib]$ ls -al /dev/ | grep acd0 > > > crw-rw---- 1 root cdrom 4, 21 Nov 9 23:11 acd0 > > > lrwxr-xr-x 1 root wheel 4 Nov 9 23:11 cdrom -> > > > acd0 > > > > > > So far so good. > > > > > > But when I add these lines: > > > own acd0 root:cdrom > > > perm acd0 0660 > > > to /etc/devfs.conf > > > > > > I get this: > > > /etc/rc: WARNING: devfs_set_ruleset: you must specify a ruleset > > > number /etc/rc: WARNING: devfs_apply_ruleset: you must specify a > > > ruleset > > > > > > in my dmesg. > > > > > > Okey. So I took a look in /etc/defaults/devfs.rules and did the > > > following: (PS: I removed the own/perm lines in /etc/devfs.conf > > > # touch /etc/devfs.rules > > > And added these lines to the file: > > > [devfsrules_cdrom=3D10] > > > add path acd0 group cdrom > > > add path acd0 mode 06660 > > > > > > When I reboot I get the same error messages: > > > /etc/rc: WARNING: devfs_set_ruleset: you must specify a ruleset > > > number /etc/rc: WARNING: devfs_apply_ruleset: you must specify a > > > ruleset > > > > > > Here's the kicker, even though I get these error messages it "DOES > > > WHAT I WANT"... > > > > > > My questions is, what is the proper way of specifying a ruleset in > > > either /etc/devfs.conf or /etc/devfs.rules and wich of the files > > > should I use ? > > > > > > I'm sorry if I missed something obvious in the manpages (or did not > > > google enough). > > > > > > Please CC me for I'm not on the list. > > > > Do you have something like this in your rc.conf? > > devfs_system_ruleset=3D"system" > > Judging by your devfs.rules you want: > > devfs_system_ruleset=3D"devfsrules_cdrom" > > > > > > -- > > Anish Mistry > > Humm. This works. But how to come about this when I have setup some more > rules ? Can I add new lines e.g: > devfs_system_ruleset=3D"devfsrules_cdrom" > devfs_system_ruleset=3D"devfsrules_bar" > devfs_.... e.t.c. ? I'm not sure. If you want to add more rules to the set you can just add=20 them under that same section. ie. [system=3D10] add path acd0 group operator add path acd0 mode 0660 add path 'da*' group operator add path 'da*' mode 0660 add path 'ugen*' group operator add path 'ugen*' mode 0660 add path 'ucom*' group operator add path 'ucom*' mode 0660 =2D-=20 Anish Mistry --nextPart1531171.v76QrLaAOG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBknIbxqA5ziudZT0RAsqfAJ9F9+mIDm3E59LFoILpRfylk16QgACfWpO+ tPTUw3WMdXmVNkdo0TnWOd4= =wyXT -----END PGP SIGNATURE----- --nextPart1531171.v76QrLaAOG--