Date: Sat, 12 Apr 2008 00:08:53 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: "Loren M. Lang" <lorenl@north-winds.org> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: USB Flash Drive Permissions Message-ID: <87r6dc6qvu.fsf@kobe.laptop> In-Reply-To: <20080411173025.GA79540@slackbox.xs4all.nl> (Roland Smith's message of "Fri, 11 Apr 2008 19:30:25 %2B0200") References: <20080411163640.GA18928@alzatex.com> <20080411173025.GA79540@slackbox.xs4all.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 11 Apr 2008 19:30:25 +0200, Roland Smith <rsmith@xs4all.nl> wrote: > For setting permissions on hotpluggable device nodes, you need to look > at devfs.rules. See > http://www.xs4all.nl/~rsmith/freebsd/index.html#hotplug Excellent stuff :) >> I catted the pipe of devd and saw my device attach as umass0 with a >> serial number that would be ideal to match on (I'd prefer that it >> only match on my personal flash drive,) > > Normally, a da device gets the first available number. This way you > cannot tell which device node your flash drive will get. You will need > a to set a label on the flash drive. The tool newfs_msdos or the > mtools port can do that for you. Next time you plug the device in you > will find it as /dev/msdosfs/<label>, which you can use in > devfs.rules. Just a short additional note: newfs(8) -- the UFS/UFS2 version -- also supports labels. I use UFS labels in the build of bootable USB images, to make it possible to have somewhat predictable mount points for the root filesystem in /etc/fstab, i.e.: # Device Mountpoint FStype Options Dump Pass# /dev/ufs/USBROOT none ufs rw 1 1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87r6dc6qvu.fsf>