From owner-freebsd-questions@FreeBSD.ORG Sat Jul 8 15:31:59 2006 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 4B04216A4DA for ; Sat, 8 Jul 2006 15:31:59 +0000 (UTC) (envelope-from micahjon@ywave.com) Received: from relay0.av-mx.com (relay0.av-mx.com [137.118.16.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id C171B43D46 for ; Sat, 8 Jul 2006 15:31:58 +0000 (GMT) (envelope-from micahjon@ywave.com) X-Virus-Scan-Time: 0 Received: from [137.118.16.61] (HELO mx0.av-mx.com) by relay0.av-mx.com (CommuniGate Pro SMTP 4.2.10) with SMTP id 319160637 for freebsd-questions@freebsd.org; Sat, 08 Jul 2006 11:31:55 -0400 Received: (qmail 2799 invoked from network); 8 Jul 2006 15:31:54 -0000 Received: from dsl20226.ywave.com (HELO ?192.168.1.65?) (micahjon@ywave.com@216.227.107.226) by 0 with SMTP; 8 Jul 2006 15:31:54 -0000 X-CLIENT-IP: 216.227.107.226 X-CLIENT-HOST: dsl20226.ywave.com Message-ID: <44AFCFE8.80902@ywave.com> Date: Sat, 08 Jul 2006 08:31:52 -0700 From: Micah User-Agent: Thunderbird 1.5.0.4 (X11/20060611) MIME-Version: 1.0 To: a.l.w.kuijper@rug.nl References: <44AFB730.5090905@rug.nl> In-Reply-To: <44AFB730.5090905@rug.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: usb storage device mounting problems 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: Sat, 08 Jul 2006 15:31:59 -0000 Bram Kuijper wrote: > Hi all, > > I got some problems with mounting my usb device. I did all the stuff > according to point 9.22 in the FreeBSD FAQ, but I still cannot mount my > usb storage key (a sandisk cruzer mini 256 MB) as an ordinary user, > without having to change the group owner as a root. Adding the needed > lines to devfs.conf doesn't seem to help in retaining the settings > across multiple reboots. I run FreeBSD-stable 6.1 > > in /etc/sysctl.conf I added: > vfs.usermount=1 > > I added to my etc/devfs.conf the following lines: > own /dev/da0s1 root:usb > perm /dev/da0s1 0666 > > I added myself, the ordinary user to the group usb and checked if that > worked out by doing id $myusername: > uid=1002($myusername) gid=0(wheel) groups=0(wheel), 1002(usb), 1004(cvs) > > so I am in the group usb, and if everything went allright, also the > folder /dev/da0s1 should now owned by the group usb. So I'll reboot and > plugin the device. > > I reboot and plugin my usb key. Check if things are recognized using > usbdevs: > $ devfs > addr 1: UHCI root hub, Intel > addr 2: product 0x3108, vendor 0x04b3 > addr 1: UHCI root hub, Intel > addr 2: Cruzer Mini, SanDisk Corporation > seems it has been recognized. Now I check the user rights on dev/da0s1 > > $ su > $ ls -aln /dev | grep da0 > crw-r----- 1 0 5 0, 107 Jul 8 15:17 da0 > crw-r----- 1 0 5 0, 108 Jul 8 15:17 da0s1 > crw-r----- 1 0 5 0, 108 Jul 8 15:17 da0s1 > > alas, despite the changes made in devfs.conf, the group in which da0s1 > is in, is still another one than the usb-group (which has 1002) as a > group identifier. So still not able to mount the device as an ordinary > user. > > anybody advice on how to tweak my devfs.conf, so that it works? > > thanks, > > Bram devfs.conf is only consulted on boot. You need to play with devfs.rules instead. Put something like this in devfs.rules: [system=10] add path 'da*' mode 0660 group usb and add this to rc.conf: devfs_system_ruleset="system" HTH, Micah