Date: Sun, 3 Dec 2006 00:12:49 +0100 From: Roland Smith <rsmith@xs4all.nl> To: Marc Fonvieille <blackend@FreeBSD.org> Cc: FreeBSD-gnats-submit@FreeBSD.org, doc@FreeBSD.org Subject: Re: docs/106148: [PATCH] extend the documentation for handling USB drives Message-ID: <20061202231249.GA84844@slackbox.xs4all.nl> In-Reply-To: <20061202092230.GA96391@abigail.blackend.org> References: <20061201181553.67AA8B844@slackbox.xs4all.nl> <20061202092230.GA96391@abigail.blackend.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 02, 2006 at 10:22:30AM +0100, Marc Fonvieille wrote: > Your idea is a great improvement to the current section, but I think it > would be better to use the same scheme as the one used by the FreeBSD > GNOME team for HAL, i.e, using operator group as in > http://www.freebsd.org/gnome/docs/faq2.html#q19 > This would keep a consistency between our docs and would be compatible > with GNOME and other things using HAL. Here is the new patch, as promised: ---- /usr/doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml patch ---- --- chapter.sgml.orig Sun Oct 8 17:01:02 2006 +++ chapter.sgml Sat Dec 2 12:55:30 2006 @@ -777,6 +777,67 @@ <para>to your configuration file for USB 2.0 support. Note &man.uhci.4; and &man.ohci.4; drivers are still needed if you want USB 1.X support.</para> + + <para>To make these devices mountable as a normal user, certain steps + have to be taken. First, the devices that are created when a USB + storage device is connected need to be accessible by the user. A + solution is to make all users of these devices a member of the + operator group. This is also done with &man.pw.8;. Second, when the + devices are created, the operator group should be able to read and + write them. This is accomplished by adding a line for these devices + to &man.devfs.rules.5;; + </para> + + <programlisting>add path 'da*' mode 0660 group operator</programlist= ing> + + <note> + <para>If there already are SCSI disks in the system, it must be + done a bit different. E.g., if the system already contains + disks <filename>da0</filename> through <filename>da2</filename> + attached to the system, change the line as follows: + </para> + + <programlisting>add path 'da[3-9]*' mode 0660 group operator</programlist= ing> + + <para>This will exclude the already existing disks from belonging + to the operator group. + </para> + + </note> + + <para>Next, the kernel has to be configured to allow regular users to + mount filesystems. The easiest way is to add the following line to + &man.sysctl.conf.5;: + </para> + + <programlisting>vfs.usermount=3D1</programlisting> + + <para>Note that this only takes effect after the next + reboot. Alternatively, one can also use &man.sysctl.8; to set this + variable. + </para> + + <para>The final step is to create a directory where the filesystem is + to be mounted. This directory needs to be owned by the user that is + to mount the filesystem. One way to do that is for root to create a + subdirectory owned by that user + as <filename>/mnt/$USER</filename> (replace $USER by the login name + of the actual user): + </para> + + <programlisting> +mkdir /mnt/$USER +chown $USER:$USER /mnt/$USER</programlisting> + + <para>Suppose a USB thumbdrives is plugged in, and a + device <filename>/dev/da0s1</filename> appears. Since these devices + usually come preformatted with a FAT filesystem, one can mount them + like this: + </para> + + <programlisting>mount_msdosfs -m 644 -M 755 /dev/da0s1 + /mnt/$USER</programlisting> + </sect2> =20 <sect2> ---- /usr/doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml patch ---- 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) --VbJkn9YxBvnuCH5J Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFcghxEnfvsMMhpyURAkrtAKCXRK5eq7m1pscMswjnqktefb6tWQCcDswe JfhDiF2TC7ZXyjzs3Qx85Fg= =s9gU -----END PGP SIGNATURE----- --VbJkn9YxBvnuCH5J--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061202231249.GA84844>