From owner-freebsd-doc@FreeBSD.ORG Wed Feb 2 07:30:49 2005 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2243F16A4CF for ; Wed, 2 Feb 2005 07:30:49 +0000 (GMT) Received: from asclepius.uwa.edu.au (asclepius3.uwa.edu.au [130.95.128.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3627F43D1D for ; Wed, 2 Feb 2005 07:30:48 +0000 (GMT) (envelope-from zanchey@mussel.ucc.gu.uwa.edu.au) Received: from asclepius.kas (localhost.localdomain [127.0.0.1]) by asclepius.uwa.edu.au (Postfix) with SMTP id BC5E418347D for ; Wed, 2 Feb 2005 15:30:46 +0800 (WST) Received: from asclepius (localhost.localdomain [127.0.0.1]) by asclepius.prekas (Postfix) with SMTP id A0ECB18370D for ; Wed, 2 Feb 2005 15:30:46 +0800 (WST) X-UWA-Client-IP: 130.95.13.9 (UWA) Received: from mooneye.ucc.gu.uwa.edu.au (mooneye.ucc.gu.uwa.edu.au [130.95.13.9]) by asclepius.input (Postfix) with ESMTP id 8934A18356D for ; Wed, 2 Feb 2005 15:30:46 +0800 (WST) Received: by mooneye.ucc.gu.uwa.edu.au (Postfix, from userid 801) id 0605D17F1E; Wed, 2 Feb 2005 15:30:45 +0800 (WST) Received: from mussel.ucc.gu.uwa.edu.au (mussel.ucc.gu.uwa.edu.au [130.95.13.18]) by mooneye.ucc.gu.uwa.edu.au (Postfix) with ESMTP id 77B9117E9E for ; Wed, 2 Feb 2005 15:30:45 +0800 (WST) Received: from zanchey (helo=localhost) by mussel.ucc.gu.uwa.edu.au with local-esmtp (Exim 3.36 #1 (Debian)) id 1CwEyL-00051R-00 for ; Wed, 02 Feb 2005 15:30:45 +0800 Date: Wed, 2 Feb 2005 15:30:45 +0800 (WST) From: David Adam To: freebsd-doc@FreeBSD.org In-Reply-To: <200502020710.j127ANrb024192@freefall.freebsd.org> Message-ID: References: <200502020710.j127ANrb024192@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: David Adam X-SpamTest-Info: Profile: Formal (207/050201) X-SpamTest-Info: Profile: Detect Hard [UCS 290904] X-SpamTest-Info: Profile: SysLog X-SpamTest-Info: Profile: Marking Spam - Subject (UCS) [02-08-04] X-SpamTest-Status: Not detected X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0125], KAS/Release Subject: Re: docs/76942: [PATCH] FAQ: Mounting as users: Cleanup and move to 5.X X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2005 07:30:49 -0000 Apologies for the Base64. Patch is now inline or can be accessed at http://zanchey.ucc.asn.au/freebsd/faq.book.sgml.patch David Adam zanchey@ucc.gu.uwa.edu.au ----- --- faq.book.sgml.orig 2005-02-01 13:10:22.000000000 +0800 +++ faq.book.sgml 2005-02-02 10:43:08.000000000 +0800 @@ -6174,17 +6174,21 @@ - How do I let ordinary users mount floppies, CDROMs and + How do I let ordinary users mount floppies, CD-ROMs and other removable media? Ordinary users can be permitted to mount devices. Here is how: + + On &os; 4.X and below, you should replace the device + /dev/acd0 with /dev/acd0c in the examples + below. - As root set the sysctl variable + As root, set the sysctl variable vfs.usermount to 1. @@ -6202,13 +6206,36 @@ &prompt.root; chmod 666 /dev/fd0 To allow users in the group - operator to mount the CDROM drive, + operator to mount the CD-ROM drive, use: - &prompt.root; chgrp operator /dev/cd0c -&prompt.root; chmod 640 /dev/cd0c + &prompt.root; chgrp operator /dev/acd0 +&prompt.root; chmod 640 /dev/acd0 + + + You will need to alter your &man.devfs.conf.5; to make these + changes permanent across reboots. + + This step does not apply to &os; 4.X and below. + + As root, add the relevant lines to + /etc/devfs.conf. For example, to allow users + to mount the first floppy drive, add: + + # Allow all users to mount the floppy disk. +own /dev/fd0 root:operator +perm /dev/fd0 0666 + + To allow users in the group operator + + # Allow members of the group operator to mount CD-ROMs. +own /dev/acd0 root:operator +perm /dev/acd0 0660 + + Finally, add the line vfs.usermount=1 @@ -6225,21 +6252,21 @@ &prompt.user; mount -t msdos /dev/fd0 ~/my-mount-point Users in group operator can now - mount the CDROM /dev/cd0c onto a + mount the CD-ROM /dev/acd0 onto a directory that they own: &prompt.user; mkdir ~/my-mount-point -&prompt.user; mount -t cd9660 /dev/cd0c ~/my-mount-point +&prompt.user; mount -t cd9660 /dev/acd0 ~/my-mount-point Unmounting the device is simple: &prompt.user; umount ~/my-mount-point - Enabling vfs.usermount, however, + Enabling vfs.usermount has negative security implications. A better way to access &ms-dos; formatted media is to use the emulators/mtools - package in the ports collection. + package in the ports collection.