[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



 - Mills
 

-----Original Message-----
From: ale-bounces at ale.org [<a  rel="nofollow" href="mailto:ale-bounces";>mailto:ale-bounces</a> at ale.org] On Behalf Of
To: ale at ale.org
Jason Day
Sent: Tuesday, November 29, 2005 1:33 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] Q: How do I make permissions on /dev/* 'sticky'?

On Tue, Nov 29, 2005 at 09:09:06AM -0500, Mills, John M. wrote:
&gt; I notice that access permissions of '/dev/*' devices are reset to
&gt; defaults when my systems reboot, losing access for ordinary users
where
&gt; I may have set it manually (i.e., /dev/ttyS* for 'minicom', etc). I
&gt; conjecture this is an effect (&quot;feature&quot;?) of the '/dev' filesystem
since
&gt; such permission changes used to be persistent, but that's only a
guess.

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.

&gt; Q1: How can I define these permissions so they receive my new settings
&gt; 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==&quot;ttyS[0-9]*&quot;,   NAME=&quot;tts/%n&quot;, SYMLINK+=&quot;%k&quot;, GROUP=&quot;tty&quot;

So, if I wanted ttyS* to have permissions 0666, I would add the
following line to my 10-local.rules file:

KERNEL==&quot;ttyS[0-9]*&quot;,   NAME=&quot;tts/%n&quot;, SYMLINK+=&quot;%k&quot;, GROUP=&quot;tty&quot;,
MODE=&quot;0666&quot;

Note that that should be one line.

&gt; Q2: How can I add new devices to those created on reboot? I could add
&gt; 'mknod' lines to rc.local, or similar, but is there a less &quot;clunky&quot;
way
&gt; 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
 
&quot;Of course I'm paranoid, everyone is trying to kill me.&quot;
    -- Weyoun-6, Star Trek: Deep Space 9
_______________________________________________
Ale mailing list
Ale at ale.org
<a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>




</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00416.html">[ale] Q: How do I make permissions on /dev/* 'sticky'?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00418.html">[ale] zv5000</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00415.html">[ale] kopete and gtalk?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00419.html">[ale] Video on Linux - need some help getting started</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00417"><strong>Date</strong></a></li>
<li><a href="threads.html#00417"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>