Date: Fri, 21 May 2010 23:08:14 +0200 From: Roland Smith <rsmith@xs4all.nl> To: Gary Kline <kline@thought.org> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: how do i use a memory stick on freebsd? Message-ID: <20100521210814.GA68796@slackbox.erewhon.net> In-Reply-To: <20100521190340.GA66314@thought.org> References: <20100521190340.GA66314@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100521210814.GA68796>