From owner-freebsd-doc@FreeBSD.ORG Fri Dec 1 18:15:55 2006 Return-Path: X-Original-To: doc@freebsd.org Delivered-To: freebsd-doc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8BD816A415; Fri, 1 Dec 2006 18:15:55 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr12.xs4all.nl (smtp-vbr12.xs4all.nl [194.109.24.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E24A43CAE; Fri, 1 Dec 2006 18:15:39 +0000 (GMT) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr12.xs4all.nl (8.13.8/8.13.8) with ESMTP id kB1IFrPS012580; Fri, 1 Dec 2006 19:15:54 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 67AA8B844; Fri, 1 Dec 2006 19:15:53 +0100 (CET) To: FreeBSD-gnats-submit@freebsd.org From: Roland Smith X-send-pr-version: 3.113 X-GNATS-Notify: Message-Id: <20061201181553.67AA8B844@slackbox.xs4all.nl> Date: Fri, 1 Dec 2006 19:15:53 +0100 (CET) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: doc@freebsd.org Subject: [PATCH] extend the documentation for handling USB drives X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Roland Smith List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 18:15:56 -0000 >Submitter-Id: current-users >Originator: Roland Smith >Organization: >Confidential: no >Synopsis: [PATCH] extend the documentation for handling USB drives >Severity: non-critical >Priority: low >Category: docs >Class: change-request >Release: FreeBSD 6.2-PRERELEASE amd64 >Environment: System: FreeBSD slackbox.xs4all.nl 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Sat Nov 25 00:14:25 CET 2006 rsmith@slackbox.xs4all.nl:/usr/obj/usr/src/sys/RFS amd64 >Description: The disks chapter of the handbook is quite short in its description of the handling of USB mass-storage drives. The included patch is an attempt to expand/clarify this for new users. >How-To-Repeat: N/A >Fix: This patch has been tested to apply cleanly on revision 1.265 and 1.267. ------- patch for en_US.ISO8859-1/books/handbook/disks/chapter.sgml ------- --- chapter.sgml.orig Sun Oct 8 17:01:02 2006 +++ chapter.sgml Sun Oct 8 17:48:40 2006 @@ -777,6 +777,68 @@ 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. + + 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. A solution is to + create a group (e.g. named usb) that users of these devices need to + belong to. This is done with &man.pw.8;. The users in question also + need to be added to that group. This is also done with + &man.pw.8;. Second, when the devices are created, they have to be + accessible by this group. This is accomplished by adding a line for + these devices to &man.devfs.rules.5;; + + + add path 'da*' mode 0660 group usb + + + If you already have SCSI disks in your system, you want to + do this a bit different. E.g., if you already have + disks da0 through da2 + attached to the system, change the line as follows: + + + add path 'da[3-9]*' mode 0660 group usb + + This will exclude the already existing disks from the usb + group. + + + + + 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;: + + + vfs.usermount=1 + + Note that this only takes effect after the next + reboot. Alternatively, one can also use &man.sysctl.8; to set this + variable. + + + 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 /mnt/$USER (replace $USER by the login name + of the actual user): + + + +mkdir /mnt/$USER +chown $USER:$USER /mnt/$USER + + Suppose a USB thumbdrives is plugged in, and a + device /dev/da0s1 appears. Since these devices + usually come preformatted with a FAT filesystem, one can mount them + like this: + + + mount_msdosfs -m 644 -M 755 /dev/da0s1 + /mnt/$USER + ------- patch for en_US.ISO8859-1/books/handbook/disks/chapter.sgml -------