From owner-freebsd-questions@FreeBSD.ORG Wed Apr 28 19:42:41 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C0B01065674 for ; Wed, 28 Apr 2010 19:42:41 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr11.xs4all.nl (smtp-vbr11.xs4all.nl [194.109.24.31]) by mx1.freebsd.org (Postfix) with ESMTP id C923E8FC28 for ; Wed, 28 Apr 2010 19:42:40 +0000 (UTC) Received: from slackbox.erewhon.net (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr11.xs4all.nl (8.13.8/8.13.8) with ESMTP id o3SJgd5W046263; Wed, 28 Apr 2010 21:42:39 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.net (Postfix, from userid 1001) id 0AF0DBA96; Wed, 28 Apr 2010 21:42:39 +0200 (CEST) Date: Wed, 28 Apr 2010 21:42:39 +0200 From: Roland Smith To: Marco Beishuizen Message-ID: <20100428194239.GA36148@slackbox.erewhon.net> References: <20100428182223.GA34355@slackbox.erewhon.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: 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.20 (2009-06-14) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: Using a scanner (USB) as user and not as root 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: Wed, 28 Apr 2010 19:42:41 -0000 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 28, 2010 at 09:00:40PM +0200, Marco Beishuizen wrote: > On Wed, 28 Apr 2010, Roland Smith wrote: >=20 > > Are the permissions correct? Check with 'ls -l /dev/usb/ /dev/ugen*'. > > Is your user-id in the usb group? Check by running 'id' as the normal u= ser. > > > > If all that is in order, remove all lines except the three above from > > /etc/devfs.rules, and try again. >=20 > Running id as user looks ok: >=20 > uid=3D1001(marco) gid=3D0(wheel) groups=3D0(wheel),5(operator),1001(usb) >=20 > But the permissions are not: >=20 > ls -l /dev/usb/ /dev/ugen* > lrw-rw-r-- 1 root usb 9 Apr 28 19:05 /dev/ugen0.1 -> usb/0.1.0 > lrw-rw-r-- 1 root usb 9 Apr 28 19:05 /dev/ugen1.1 -> usb/1.1.0 > lrw-rw-r-- 1 root usb 9 Apr 28 21:05 /dev/ugen1.2 -> usb/1.2.0 > lrw-rw-r-- 1 root usb 9 Apr 28 21:05 /dev/ugen1.3 -> usb/1.3.0 > lrw-rw-r-- 1 root usb 9 Apr 28 19:05 /dev/ugen2.1 -> usb/2.1.0 >=20 > /dev/usb/: > total 0 > crw------- 1 root operator 0, 87 Apr 28 19:05 0.1.0 > crw------- 1 root operator 0, 93 Apr 28 19:05 0.1.1 > crw------- 1 root operator 0, 89 Apr 28 19:05 1.1.0 > crw------- 1 root operator 0, 94 Apr 28 19:05 1.1.1 > crw------- 1 root operator 0, 104 Apr 28 21:05 1.2.0 > crw------- 1 root operator 0, 105 Apr 28 21:05 1.2.1 > crw------- 1 root operator 0, 117 Apr 28 21:05 1.3.0 > crw------- 1 root operator 0, 119 Apr 28 21:05 1.3.1 > crw------- 1 root operator 0, 91 Apr 28 19:05 2.1.0 > crw------- 1 root operator 0, 95 Apr 28 19:05 2.1.1 In that case I think that there is something wrong with your rules. Running 'devfs rule show' should show the current active ruleset. Make sure that there is a newline at the end of your 'usb/*' rule! Otherwise the shell script that parses /etc/devfs.rules will not spot the last line. 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) --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvYj68ACgkQEnfvsMMhpyVvEQCfTYenUT3yJUQ2w9NeQ84p8bDu cxsAoKyCBFVY/9x/SKBz5jVRjmV0CoJb =ozIv -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--