Bug 76942

Summary: [PATCH] FAQ: Mounting as users: Cleanup and move to 5.X
Product: Documentation Reporter: David Adam <zanchey>
Component: Books & ArticlesAssignee: jcamou
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
faq.book.sgml.patch none

Description David Adam 2005-02-01 06:40:04 UTC
As mentioned in http://lists.freebsd.org/pipermail/freebsd-doc/2005-January/007012.html, the FAQ does not deal with allowing ordinary users to mount disks on FreeBSD versions > 4.

Fix: Patch pasted below, also available at http://zanchey.ucc.asn.au/freebsd/faq.book.sgml.patch



<qandaentry>
         <question id="user-floppymount">
-          <para>How do I let ordinary users mount floppies, CDROMs and
+          <para>How do I let ordinary users mount floppies, CD-ROMs and
             other removable media?</para>
         </question>

         <answer>
           <para>Ordinary users can be permitted to mount devices. Here is
             how:</para>
+
+         <note>On &os; 4.X and below, you should replace the device <filename>
+           /dev/acd0</filename> with <filename>/dev/cd0c</filename> in the examples
+           below.</note>

           <procedure>
             <step>
-              <para>As <username>root</username> set the sysctl variable
+              <para>As <username>root</username>, set the sysctl variable
                 <varname>vfs.usermount</varname> to
                 <literal>1</literal>.</para>

@@ -6202,13 +6206,36 @@
               <screen>&prompt.root; <userinput>chmod 666 /dev/fd0</userinput></screen>

               <para>To allow users in the group
-                <groupname>operator</groupname> to mount the CDROM drive,
+                <groupname>operator</groupname> to mount the CD-ROM drive,
                 use:</para>

-              <screen>&prompt.root; <userinput>chgrp operator /dev/cd0c</userinput>
-&prompt.root; <userinput>chmod 640 /dev/cd0c</userinput></screen>
+              <screen>&prompt.root; <userinput>chgrp operator /dev/acd0</userinput>
+&prompt.root; <userinput>chmod 640 /dev/acd0</userinput></screen>
+
             </step>

+           <step>
+             <para>You will need to alter your &man.devfs.conf.5; to make these
+               changes permanent across reboots.</para>
+
+             <note>This step does not apply to &os; 4.X and below.</note>
+
+             <para>As <username>root</username>, add the relevant lines to
+               <filename>/etc/devfs.conf</filename>. For example, to allow users
+               to mount the first floppy drive, add:</para>
+
+             <programlisting># Allow all users to mount the floppy disk.
+own     /dev/fd0        root:operator
+perm    /dev/fd0        0666</programlisting>
+
+             <para>To allow users in the group <groupname>operator</groupname
+              to mount the CD-ROM drive, add:</para>
+
+            <programlisting># Allow members of the group operator to mount CD-ROMs.
+own     /dev/acd0       root:operator
+perm    /dev/acd0       0660
+           </step>
+
             <step>
               <para>Finally, add the line
                 <literal><varname>vfs.usermount</varname>=1</literal>
@@ -6225,21 +6252,21 @@
 &prompt.user; <userinput>mount -t msdos /dev/fd0 ~/my-mount-point</userinput></screen>

           <para>Users in group <groupname>operator</groupname> can now
-            mount the CDROM <devicename>/dev/cd0c</devicename> onto a
+            mount the CD-ROM <devicename>/dev/acd0</devicename> onto a
             directory that they own:</para>

           <screen>&prompt.user; <userinput>mkdir ~/my-mount-point</userinput>
-&prompt.user; <userinput>mount -t cd9660 /dev/cd0c ~/my-mount-point</userinput></screen>
+&prompt.user; <userinput>mount -t cd9660 /dev/acd0 ~/my-mount-point</userinput></screen>

           <para>Unmounting the device is simple:</para>

           <screen>&prompt.user; <userinput>umount ~/my-mount-point</userinput></screen>

-          <para>Enabling <varname>vfs.usermount</varname>, however,
+          <note>Enabling <varname>vfs.usermount</varname>,
             has negative security implications.  A better way to
             access &ms-dos; formatted media is to use the
             <filename role="package">emulators/mtools</filename>
-            package in the ports collection.</para>
+            package in the ports collection.</note>
         </answer>
       </qandaentry>--Igm85KrqUP56VVlZIuVwuehP1uvEYV6DKYdrx0gc7qCegpIj
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- faq.book.sgml.orig  2005-02-01 13:10:22.000000000 +0800
+++ faq.book.sgml       2005-02-01 14:10:37.000000000 +0800
@@ -6174,17 +6174,21 @@
How-To-Repeat: Examine the FAQ entry currently numbered 9.22, with an id of user-floppymount.
Comment 1 David Adam 2005-02-02 07:07:02 UTC
As per discussion with Lowell Gilbert on freebsd-doc@, I have updated the
patch to take into account IDE CD-ROM users on 4.X and minor grammar
cleanup.

It should also be noted that both the original and updated patch contain
several minor grammar and terminological fixes (s/CDROM/CD-ROM being the
obvious one).

New patch is attached.

David Adam
zanchey@ucc.gu.uwa.edu.au
Comment 2 Jesus R.Camou 2005-02-09 00:25:52 UTC
Actually, CDROM is how the docproj applies the term.  Do
you want to resubmit a corrected patch?

-- 
Jesus R. Camou <jcamou@COX.net>
jcamou@es.FreeBSD.org
Comment 3 jcamou freebsd_committer freebsd_triage 2005-03-09 14:10:34 UTC
Responsible Changed
From-To: freebsd-doc->jcamou

Take this one.
Comment 4 jcamou freebsd_committer freebsd_triage 2005-03-10 09:08:37 UTC
State Changed
From-To: open->closed

A part of the patch committed with some minor changes.