From owner-freebsd-questions@FreeBSD.ORG Tue May 15 18:52:45 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B23B16A403 for ; Tue, 15 May 2007 18:52:45 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr17.xs4all.nl (smtp-vbr17.xs4all.nl [194.109.24.37]) by mx1.freebsd.org (Postfix) with ESMTP id 0B42513C45B for ; Tue, 15 May 2007 18:52:44 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr17.xs4all.nl (8.13.8/8.13.8) with ESMTP id l4FIqhbW063984; Tue, 15 May 2007 20:52:43 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 041AFB82B; Tue, 15 May 2007 20:52:43 +0200 (CEST) Date: Tue, 15 May 2007 20:52:42 +0200 From: Roland Smith To: Jim Stapleton Message-ID: <20070515185242.GA59938@slackbox.xs4all.nl> Mail-Followup-To: Jim Stapleton , freebsd-questions@freebsd.org References: <80f4f2b20705151053n8c87790td21ab8fb8a3f4b24@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: <80f4f2b20705151053n8c87790td21ab8fb8a3f4b24@mail.gmail.com> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.15 (2007-04-06) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: /etc/devfs.conf not working properly X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2007 18:52:45 -0000 --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 15, 2007 at 01:53:47PM -0400, Jim Stapleton wrote: > I have my /etc/devfs.conf file set to make some of my files > mountable/readable directly for normal users (specifically CD/DVD > devices). However, the original permissions are being retained. Am I > doing something wrong in the setup? (I have rebooted the machine since > these entries were created) > devfs.conf: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > link acd0 cdrom > link acd0 dvd >=20 > link acd0 dvd0 > link acd1 dvd1 >=20 > link acd0 cdrom0 > link acd1 cdrom1 >=20 > own acd0 root:operator > own acd1 root:operator > own dvd root:operator > own cdrom root:operator > own dvd0 root:operator > own dvd1 root:operator > own cdrom0 root:operator > own cdrom1 root:operator >=20 > perm acd0 0770 > perm acd1 0770 > perm dvd 0770 > perm cdrom 0770 > perm dvd0 0770 > perm dvd1 0770 > perm cdrom0 0770 > perm cdrom0 0770 > the majority of the relevant files look like this: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > sjss@elrond 13:51:03 (0) /etc > ls -l /dev | grep cd > crwxrwx--- 1 root operator 0, 89 May 10 05:31 acd0 > crwxrwx--- 1 root operator 0, 90 May 10 05:31 acd1 > lrwxr-xr-x 1 root wheel 4 May 10 05:32 cdrom -> acd0 > lrwxr-xr-x 1 root wheel 4 May 10 05:32 cdrom0 -> acd0 > lrwxr-xr-x 1 root wheel 4 May 10 05:32 cdrom1 -> acd1 > lrwxr-xr-x 1 root wheel 4 May 10 05:32 dvd -> acd0 > lrwxr-xr-x 1 root wheel 4 May 10 05:32 dvd0 -> acd0 > lrwxr-xr-x 1 root wheel 4 May 10 05:32 dvd1 -> acd1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 > Their permssions are not correct at all, except for acd0/acd1. Any > suggestions on what would cause this one? You cannot set permissions on symbolic links. Check out the relevant code in /etc/rc.d/devfs:=20 p*) for device in ${devicelist}; do if [ -c ${device} ]; then chmod ${parameter} ${device} fi done ;; Without the '-h' argument to chmod, it changes the permissions on the device, not on the link! Changing permissions on a symbolic link doesn't seem to accomplish anything, btw. If I create a link to a regular file and chmod it to 000, I can still read/write the linked file. If you want all users to have access to the cdrom, use this: own cd0 root:cdrom perm cd0 0666 A bit less open would be: own cd0 root:cdrom perm cd0 0660 which restricts access to the cdrom to members of the cdrom group. AFAIK, you don't need to set execute bits on devices. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFGSgF6EnfvsMMhpyURAlY6AKCaXtgs9CaJW1PcaxKwmRyT6aEUTQCfQYLj pAPLk5ManoMlAFP2ueFTDWE= =J7/m -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu--