From owner-freebsd-questions@FreeBSD.ORG Fri May 21 21:08:18 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 17A5C106566C for ; Fri, 21 May 2010 21:08:18 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr5.xs4all.nl (smtp-vbr5.xs4all.nl [194.109.24.25]) by mx1.freebsd.org (Postfix) with ESMTP id 87B408FC0C for ; Fri, 21 May 2010 21:08:17 +0000 (UTC) Received: from slackbox.erewhon.net (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr5.xs4all.nl (8.13.8/8.13.8) with ESMTP id o4LL8Fh5007503; Fri, 21 May 2010 23:08:15 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.net (Postfix, from userid 1001) id D9D56BA93; Fri, 21 May 2010 23:08:14 +0200 (CEST) Date: Fri, 21 May 2010 23:08:14 +0200 From: Roland Smith To: Gary Kline Message-ID: <20100521210814.GA68796@slackbox.erewhon.net> References: <20100521190340.GA66314@thought.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: <20100521190340.GA66314@thought.org> 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 Mailing List Subject: Re: how do i use a memory stick on freebsd? 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: Fri, 21 May 2010 21:08:18 -0000 --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 21, 2010 at 12:03:42PM -0700, Gary Kline wrote: >=20 > guys,=20 >=20 > my wife emptied a bunch of files onto her memory stick; the pc > is not here. i have never used one of these devices before and > want to know how, if it is possible, to read her dos/lose > material from my bsd system. 7.3, dell, plenty of disk, and yes, > i know where the usb slot it! >=20 > do i need to put something in /usr/rc.conf? build a driver or > utility? or what? You can mount it as root without having to do anything special. Plug in the USB stick, and watch dmesg output to see which device appears. Say you see a device 'da0' appear. Then look in /dev/ to see if there are any slices on i= t; 'ls /dev/da0*'. You'll probably see one slice, e.g. /dev/da0s1. Then use mount_msdosfs(8) to mount it somewhere. If you want to mount as a regular user, things are somewhat more involved. First, you have to set the sysctl 'vfs.urermount=3D1'. This has t= o be done as root, of course. Then you have to make sure that the user in questi= on has read/write access to the devices. Generally, I do that by creating a gr= oup called 'usb' with the pw(8) utility, and making users that need access to U= SB devices a member of that group. Then I add some lines to /etc/devfs.rules to make the usb and related devices accessible to that group; [my_rules=3D10] add path 'da*' mode 0660 group usb add path 'msdosfs/*' mode 0660 group usb add path 'usb/*' mode 0660 group usb add path 'ugen*' mode 0660 group usb The latter two lines are to make e.g. digital cameras and scanners accessib= le. This ruleset has to be activated in /etc/rc.conf; devfs_system_ruleset=3D"my_rules" You'll need to reboot the system or restart devfs for this to take effect. With these adaptations, you can mount USB drives as a normal user. 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) --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkv29j4ACgkQEnfvsMMhpyWFhACfTDYmGHLngtQ35Kt7VCbRBKwE mvkAoJn+2RN4W201mXTLcMgvx47dJ4u6 =WsAQ -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z--