[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Tue, 29 Nov 2005 13:32:47 -0500 -->
- <!--x-from-r13: wnfbaqnl ng jbeyqarg.ngg.arg (Xnfba Rnl) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Q: How do I make permissions on /dev/* 'sticky'? -->
- <li><em>date</em>: Tue, 29 Nov 2005 13:32:47 -0500</li>
- <li><em>from</em>: jasonday at worldnet.att.net (Jason Day)</li>
- <li><em>in-reply-to</em>: <<a href="msg00409.html">[email protected]</a>></li>
- <li><em>references</em>: <<a href="msg00409.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] Q: How do I make permissions on /dev/* 'sticky'?</li>
Assuming you're using a somewhat recent distribution and 2.6 kernel,
it's udev that's the culprit here. Udev uses a series of rules files to
control how the device nodes are created. The default rules are in
/etc/udev/rules.d/50-udev.rules, but you should not edit this file
directly, since an update to udev would wipe out your changes. Instead,
create a new rules file in /etc/udev/rules.d named 10-local.rules and
customize that one.
> Q1: How can I define these permissions so they receive my new settings
> on reboot, instead of the system defaults?
To fix the perms on the ttyS* device, for example, look for the rule in
50-udev.rules, copy it to 10-local.rules, and modify the permissions.
For example, the ttyS line in my 50-udev.rules looks like this:
# tty devices
KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="tty"
So, if I wanted ttyS* to have permissions 0666, I would add the
following line to my 10-local.rules file:
KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="tty",
MODE="0666"
Note that that should be one line.
> Q2: How can I add new devices to those created on reboot? I could add
> 'mknod' lines to rc.local, or similar, but is there a less "clunky" way
> to do it?
Just add a rule for them :)
Here is a good primer for udev rules:
<a rel="nofollow" href="http://www.reactivated.net/writing_udev_rules.html">http://www.reactivated.net/writing_udev_rules.html</a>
HTH,
Jason
--
Jason Day jasonday at
<a rel="nofollow" href="http://jasonday.home.att.net">http://jasonday.home.att.net</a> worldnet dot att dot net
"Of course I'm paranoid, everyone is trying to kill me."
-- Weyoun-6, Star Trek: Deep Space 9
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00409" href="msg00409.html">[ale] Q: How do I make permissions on /dev/* 'sticky'?</a></strong>
<ul><li><em>From:</em> Mills.J at ems-t.com (Mills, John M.)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00415.html">[ale] kopete and gtalk?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00417.html">[ale] Thanks - RE: Q: How do I make permissions on /dev/* 'sticky'?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00413.html">[ale] Q: How do I make permissions on /dev/* 'sticky'?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00414.html">[ale] kopete and gtalk?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00416"><strong>Date</strong></a></li>
<li><a href="threads.html#00416"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>