Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > cf93d8a8acdcc6fe2225039da0502495 > files > 3785

kernel-doc-2.6.32-131.17.1.el6.centos.plus.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Mounting and Access Control</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="The Linux-USB Host Side API" /><link rel="up" href="ch07.html" title="Chapter&#160;7.&#160;The USB Filesystem (usbfs)" /><link rel="prev" href="ch07.html" title="Chapter&#160;7.&#160;The USB Filesystem (usbfs)" /><link rel="next" href="ch07s03.html" title="/proc/bus/usb/devices" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Mounting and Access Control</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch07.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;7.&#160;The USB Filesystem (usbfs)</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch07s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" title="Mounting and Access Control"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="usbfs-fstab"></a>Mounting and Access Control</h2></div></div></div><p>There are a number of mount options for usbfs, which will
	    be of most interest to you if you need to override the default
	    access control policy.
	    That policy is that only root may read or write device files
	    (<code class="filename">/proc/bus/BBB/DDD</code>) although anyone may read
	    the <code class="filename">devices</code>
	    or <code class="filename">drivers</code> files.
	    I/O requests to the device also need the CAP_SYS_RAWIO capability,
	    </p><p>The significance of that is that by default, all user mode
	    device drivers need super-user privileges.
	    You can change modes or ownership in a driver setup
	    when the device hotplugs, or maye just start the
	    driver right then, as a privileged server (or some activity
	    within one).
	    That's the most secure approach for multi-user systems,
	    but for single user systems ("trusted" by that user)
	    it's more convenient just to grant everyone all access
	    (using the <span class="emphasis"><em>devmode=0666</em></span> option)
	    so the driver can start whenever it's needed.
	    </p><p>The mount options for usbfs, usable in /etc/fstab or
	    in command line invocations of <span class="emphasis"><em>mount</em></span>, are:

	    </p><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>busgid</em></span>=NNNNN</span></dt><dd><p>Controls the GID used for the
		    /proc/bus/usb/BBB
		    directories.  (Default: 0)</p></dd><dt><span class="term"><span class="emphasis"><em>busmode</em></span>=MMM</span></dt><dd><p>Controls the file mode used for the
		    /proc/bus/usb/BBB
		    directories.  (Default: 0555)
		    </p></dd><dt><span class="term"><span class="emphasis"><em>busuid</em></span>=NNNNN</span></dt><dd><p>Controls the UID used for the
		    /proc/bus/usb/BBB
		    directories.  (Default: 0)</p></dd><dt><span class="term"><span class="emphasis"><em>devgid</em></span>=NNNNN</span></dt><dd><p>Controls the GID used for the
		    /proc/bus/usb/BBB/DDD
		    files.  (Default: 0)</p></dd><dt><span class="term"><span class="emphasis"><em>devmode</em></span>=MMM</span></dt><dd><p>Controls the file mode used for the
		    /proc/bus/usb/BBB/DDD
		    files.  (Default: 0644)</p></dd><dt><span class="term"><span class="emphasis"><em>devuid</em></span>=NNNNN</span></dt><dd><p>Controls the UID used for the
		    /proc/bus/usb/BBB/DDD
		    files.  (Default: 0)</p></dd><dt><span class="term"><span class="emphasis"><em>listgid</em></span>=NNNNN</span></dt><dd><p>Controls the GID used for the
		    /proc/bus/usb/devices and drivers files.
		    (Default: 0)</p></dd><dt><span class="term"><span class="emphasis"><em>listmode</em></span>=MMM</span></dt><dd><p>Controls the file mode used for the
		    /proc/bus/usb/devices and drivers files.
		    (Default: 0444)</p></dd><dt><span class="term"><span class="emphasis"><em>listuid</em></span>=NNNNN</span></dt><dd><p>Controls the UID used for the
		    /proc/bus/usb/devices and drivers files.
		    (Default: 0)</p></dd></dl></div><p>

	    </p><p>Note that many Linux distributions hard-wire the mount options
	    for usbfs in their init scripts, such as
	    <code class="filename">/etc/rc.d/rc.sysinit</code>,
	    rather than making it easy to set this per-system
	    policy in <code class="filename">/etc/fstab</code>.
	    </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch07.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch07.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch07s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&#160;7.&#160;The USB Filesystem (usbfs)&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;/proc/bus/usb/devices</td></tr></table></div></body></html>