[sllug-members]: udev question
Robert Lewis
rll at felton.felton.ca.us
Thu Dec 21 14:22:41 MST 2006
Lamont Peterson wrote:
> On Thursday 21 December 2006 12:23pm, Robert Lewis wrote:
>
>> Allen Parker wrote:
>>
>>> On 12/21/06, Robert Lewis <rll at felton.felton.ca.us> wrote:
>>>
>>>> I apologize in advance for not rereading the udev man pages
>>>> another few times. I have now read it 3 or 4 times but still
>>>> unclear how to do something I wish to do.
>>>>
>>>> I have an internal modem that uses /dev/ttyS1
>>>>
>>>> It comes up with preset permissions and ownership.
>>>>
>>>> I want the /dev/ttyS1 to end up with permissions of
>>>> 666 and perhaps owned by uucp and group uucp although
>>>> that is less important. The defaults are root:uucp
>>>> with permissions of 640. I also want modem1 to be
>>>> a symbolic link to ttyS1.
>>>>
>>>> I went into /lib/udev/devices and created the following:
>>>> 1) made sure that ttyS1 looked like:
>>>> crw-rw-rw- 1 uucp uucp 4, 65 Nov 25 04:17 ttyS1
>>>>
>>>> 2) created the modem1 symbolic link:
>>>> lrwxrwxrwx 1 root root 5 Dec 20 10:50 modem1 -> ttyS1
>>>>
>>>> After a reboot /dev does get the symbol link. However, tyS1
>>>> looks like:
>>>> crw-rw---- 1 root uucp 4, 65 Dec 21 08:39 ttyS1
>>>>
>>>> What is the best way to open up permissions on this one device
>>>> that will stick through a reboot?
>>>>
>>>> Cheers,
>>>> Bob
>>>>
>>> See /etc/udev/permissions.rules
>>> add this line in with the other KERNEL rules:
>>> KERNEL=="ttyS[0-9]*", GROUP="uucp", MODE="0666"
>>>
>>> reboot and everything should be good to go.
>>> ______________________________________________________________________
>>>
>> Thank you very much Allen. It all works now.
>>
>> Only changes I made to your suggestion:
>> On SUSE 10.2 I found no permissions.rules so I instead edited
>> the following path: /etc/udev/rules.d/50-udev-default.rules
>>
>
> Don't modify that file. Although the name may differ from one distribution to
> another, the 50-udev-default.rules file is supplied by the distribution.
> From time to time, an update will replace it, obliterating your changes.
> Instead, create an earlier file (udev stops walking through rules files on
> it's first match). I create a file called 10-local.rules or
> 10-`hostname`.rules to put my local rules in.
>
> BTW, if these files' names don't end in ".rules", they will not be processed
> by udev. This is handy if you want to disable one file temporarily, though
> I've never done that.
>
>
>> I also added in to the end of your line: OPTIONS="last_rule"
>> because although the permissions came up correct the GROUP
>> ownership didn't because some other rule downstream over wrote
>> the request I supect. The directory is layed out somewhat like
>> /etc/init.d/rc5.d in that each file is preceded with a number and
>> read in order at boot time it looks like.
>>
> [snip]
>
>
Thanks, I'll consider myself further educated as a result of your response
and many of the great people on this list.
Bob
More information about the sllug-members
mailing list