View | Details | Raw Unified | Return to bug 76942
Collapse All | Expand All

(-)faq.book.sgml (-9 / +36 lines)
Lines 6174-6190 Link Here
6174
6174
6175
      <qandaentry>
6175
      <qandaentry>
6176
        <question id="user-floppymount">
6176
        <question id="user-floppymount">
6177
          <para>How do I let ordinary users mount floppies, CDROMs and
6177
          <para>How do I let ordinary users mount floppies, CD-ROMs and
6178
            other removable media?</para>
6178
            other removable media?</para>
6179
        </question>
6179
        </question>
6180
6180
6181
        <answer>
6181
        <answer>
6182
          <para>Ordinary users can be permitted to mount devices. Here is
6182
          <para>Ordinary users can be permitted to mount devices. Here is
6183
            how:</para>
6183
            how:</para>
6184
	    
6185
	  <note>On &os; 4.X and below, you should replace the device <filename>
6186
	    /dev/acd0</filename> with <filename>/dev/acd0c</filename> in the examples
6187
	    below.</note>
6184
6188
6185
          <procedure>
6189
          <procedure>
6186
            <step>
6190
            <step>
6187
              <para>As <username>root</username> set the sysctl variable
6191
              <para>As <username>root</username>, set the sysctl variable
6188
                <varname>vfs.usermount</varname> to
6192
                <varname>vfs.usermount</varname> to
6189
                <literal>1</literal>.</para>
6193
                <literal>1</literal>.</para>
6190
6194
Lines 6202-6214 Link Here
6202
              <screen>&prompt.root; <userinput>chmod 666 /dev/fd0</userinput></screen>
6206
              <screen>&prompt.root; <userinput>chmod 666 /dev/fd0</userinput></screen>
6203
6207
6204
              <para>To allow users in the group
6208
              <para>To allow users in the group
6205
                <groupname>operator</groupname> to mount the CDROM drive,
6209
                <groupname>operator</groupname> to mount the CD-ROM drive,
6206
                use:</para>
6210
                use:</para>
6207
6211
6208
              <screen>&prompt.root; <userinput>chgrp operator /dev/cd0c</userinput>
6212
              <screen>&prompt.root; <userinput>chgrp operator /dev/acd0</userinput>
6209
&prompt.root; <userinput>chmod 640 /dev/cd0c</userinput></screen>
6213
&prompt.root; <userinput>chmod 640 /dev/acd0</userinput></screen>
6214
6210
            </step>
6215
            </step>
6211
6216
6217
	    <step>
6218
	      <para>You will need to alter your &man.devfs.conf.5; to make these
6219
	        changes permanent across reboots.</para>
6220
		
6221
	      <note>This step does not apply to &os; 4.X and below.</note>
6222
		
6223
	      <para>As <username>root</username>, add the relevant lines to
6224
	        <filename>/etc/devfs.conf</filename>. For example, to allow users
6225
		to mount the first floppy drive, add:</para>
6226
	      
6227
	      <programlisting># Allow all users to mount the floppy disk.
6228
own     /dev/fd0        root:operator
6229
perm    /dev/fd0        0666</programlisting>
6230
6231
             <para>To allow users in the group <groupname>operator</groupname
6232
	       to mount the CD-ROM drive, add:</para>
6233
6234
	     <programlisting># Allow members of the group operator to mount CD-ROMs.
6235
own     /dev/acd0       root:operator
6236
perm    /dev/acd0       0660
6237
	    </step>
6238
	    
6212
            <step>
6239
            <step>
6213
              <para>Finally, add the line
6240
              <para>Finally, add the line
6214
                <literal><varname>vfs.usermount</varname>=1</literal>
6241
                <literal><varname>vfs.usermount</varname>=1</literal>
Lines 6225-6245 Link Here
6225
&prompt.user; <userinput>mount -t msdos /dev/fd0 ~/my-mount-point</userinput></screen>
6252
&prompt.user; <userinput>mount -t msdos /dev/fd0 ~/my-mount-point</userinput></screen>
6226
6253
6227
          <para>Users in group <groupname>operator</groupname> can now
6254
          <para>Users in group <groupname>operator</groupname> can now
6228
            mount the CDROM <devicename>/dev/cd0c</devicename> onto a
6255
            mount the CD-ROM <devicename>/dev/acd0</devicename> onto a
6229
            directory that they own:</para>
6256
            directory that they own:</para>
6230
6257
6231
          <screen>&prompt.user; <userinput>mkdir ~/my-mount-point</userinput>
6258
          <screen>&prompt.user; <userinput>mkdir ~/my-mount-point</userinput>
6232
&prompt.user; <userinput>mount -t cd9660 /dev/cd0c ~/my-mount-point</userinput></screen>
6259
&prompt.user; <userinput>mount -t cd9660 /dev/acd0 ~/my-mount-point</userinput></screen>
6233
6260
6234
          <para>Unmounting the device is simple:</para>
6261
          <para>Unmounting the device is simple:</para>
6235
6262
6236
          <screen>&prompt.user; <userinput>umount ~/my-mount-point</userinput></screen>
6263
          <screen>&prompt.user; <userinput>umount ~/my-mount-point</userinput></screen>
6237
6264
6238
          <para>Enabling <varname>vfs.usermount</varname>, however,
6265
          <note>Enabling <varname>vfs.usermount</varname>
6239
            has negative security implications.  A better way to
6266
            has negative security implications.  A better way to
6240
            access &ms-dos; formatted media is to use the
6267
            access &ms-dos; formatted media is to use the
6241
            <filename role="package">emulators/mtools</filename>
6268
            <filename role="package">emulators/mtools</filename>
6242
            package in the ports collection.</para>
6269
            package in the ports collection.</note>
6243
        </answer>
6270
        </answer>
6244
      </qandaentry>
6271
      </qandaentry>
6245
6272

Return to bug 76942