/dev/ttyUSB* group changed from uucp to root?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

/dev/ttyUSB* group changed from uucp to root?

Grant Edwards-6
After an update yesterday, I've noticed that the group assigned to
ttyUSB devices has changed from uucp to root.  Non-USB serial ports
still seem to be uucp.

Was this change intentional?  If so, why?

--
Grant Edwards               grant.b.edwards        Yow! Can you MAIL a BEAN
                                  at               CAKE?
                              gmail.com            


Reply | Threaded
Open this post in threaded view
|

Re: /dev/ttyUSB* group changed from uucp to root?

Grant Edwards-6
On 2014-09-24, Grant Edwards <[hidden email]> wrote:
> After an update yesterday, I've noticed that the group assigned to
> ttyUSB devices has changed from uucp to root.  Non-USB serial ports
> still seem to be uucp.
>
> Was this change intentional?  If so, why?

P.S. It's easy enough to fix by adding a GROUP="uucp" to the udev rule
     for the serial device in question, but why would users be expected
     to do that in order to get the normal ownership for a serial port?

--
Grant Edwards               grant.b.edwards        Yow! HELLO KITTY gang
                                  at               terrorizes town, family
                              gmail.com            STICKERED to death!


Reply | Threaded
Open this post in threaded view
|

Re: /dev/ttyUSB* group changed from uucp to root?

Neil Bothwick
In reply to this post by Grant Edwards-6
On Wed, 24 Sep 2014 19:42:56 +0000 (UTC), Grant Edwards wrote:

> After an update yesterday, I've noticed that the group assigned to
> ttyUSB devices has changed from uucp to root.  Non-USB serial ports
> still seem to be uucp.

What did you update? They are still root:uucp here.


--
Neil Bothwick

WinErr 01A: Operating system overwritten - Please reinstall all your
software. We are terribly sorry.

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /dev/ttyUSB* group changed from uucp to root?

Grant Edwards-6
On 2014-09-24, Neil Bothwick <[hidden email]> wrote:
> On Wed, 24 Sep 2014 19:42:56 +0000 (UTC), Grant Edwards wrote:
>
>> After an update yesterday, I've noticed that the group assigned to
>> ttyUSB devices has changed from uucp to root.  Non-USB serial ports
>> still seem to be uucp.
>
> What did you update? They are still root:uucp here.

Several things got updated, but the most likely suspect is probably
sys-fs/udev-215-r1 => sys-fs/udev-216.  But, I don't see any changes
in the default rules to account for the change in behavior.

--
Grant Edwards               grant.b.edwards        Yow! I want to mail a
                                  at               bronzed artichoke to
                              gmail.com            Nicaragua!


Reply | Threaded
Open this post in threaded view
|

Re: /dev/ttyUSB* group changed from uucp to root?

Mike Gilbert-2
On Wed, Sep 24, 2014 at 6:28 PM, Grant Edwards
<[hidden email]> wrote:

> On 2014-09-24, Neil Bothwick <[hidden email]> wrote:
>> On Wed, 24 Sep 2014 19:42:56 +0000 (UTC), Grant Edwards wrote:
>>
>>> After an update yesterday, I've noticed that the group assigned to
>>> ttyUSB devices has changed from uucp to root.  Non-USB serial ports
>>> still seem to be uucp.
>>
>> What did you update? They are still root:uucp here.
>
> Several things got updated, but the most likely suspect is probably
> sys-fs/udev-215-r1 => sys-fs/udev-216.  But, I don't see any changes
> in the default rules to account for the change in behavior.
>

I'm running systemd-216, and I see this in
/lib/udev/rules.d/50-udev-default.rules:

KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*",
GROUP="uucp"

I suppose it is possible that some later rule overrides it, but I
don't see anything obvious.

Reply | Threaded
Open this post in threaded view
|

Re: /dev/ttyUSB* group changed from uucp to root?

Grant Edwards-6
On 2014-09-25, Mike Gilbert <[hidden email]> wrote:

> On Wed, Sep 24, 2014 at 6:28 PM, Grant Edwards
><[hidden email]> wrote:
>> On 2014-09-24, Neil Bothwick <[hidden email]> wrote:
>>> On Wed, 24 Sep 2014 19:42:56 +0000 (UTC), Grant Edwards wrote:
>>>
>>>> After an update yesterday, I've noticed that the group assigned to
>>>> ttyUSB devices has changed from uucp to root.  Non-USB serial ports
>>>> still seem to be uucp.
>>>
>>> What did you update? They are still root:uucp here.
>>
>> Several things got updated, but the most likely suspect is probably
>> sys-fs/udev-215-r1 => sys-fs/udev-216.  But, I don't see any changes
>> in the default rules to account for the change in behavior.
>>
>
> I'm running systemd-216, and I see this in
> /lib/udev/rules.d/50-udev-default.rules:
>
> KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*",
> GROUP="uucp"
>
> I suppose it is possible that some later rule overrides it, but I
> don't see anything obvious.

Yes, I saw that rule (and it hasn't changed recently).  I also have a
rule that creates a symlink for a certain USB-serial adapter in
/etc/udev/rules.d/99-user.rules:

SUBSYSTEMS=="usb",\
 ATTRS{product}=="FT232R USB UART",\
 ATTRS{serial}=="AH026Q3X",\
 KERNEL=="ttyUSB*",\
 SYMLINK+="ttyDBG",\
 GROUP="uucp"

I didn't used to need to set the GROUP in that rule, the device file
just defaulted to having a group of uucp. Yesterday, I had to add the
"GROUP" command to get the behavior I always used to get without it.

--
Grant Edwards               grant.b.edwards        Yow! My haircut is totally
                                  at               traditional!
                              gmail.com            


Reply | Threaded
Open this post in threaded view
|

Re: /dev/ttyUSB* group changed from uucp to root?

Mike Gilbert-2
On Thu, Sep 25, 2014 at 11:28 AM, Grant Edwards
<[hidden email]> wrote:

> On 2014-09-25, Mike Gilbert <[hidden email]> wrote:
>> On Wed, Sep 24, 2014 at 6:28 PM, Grant Edwards
>><[hidden email]> wrote:
>>> On 2014-09-24, Neil Bothwick <[hidden email]> wrote:
>>>> On Wed, 24 Sep 2014 19:42:56 +0000 (UTC), Grant Edwards wrote:
>>>>
>>>>> After an update yesterday, I've noticed that the group assigned to
>>>>> ttyUSB devices has changed from uucp to root.  Non-USB serial ports
>>>>> still seem to be uucp.
>>>>
>>>> What did you update? They are still root:uucp here.
>>>
>>> Several things got updated, but the most likely suspect is probably
>>> sys-fs/udev-215-r1 => sys-fs/udev-216.  But, I don't see any changes
>>> in the default rules to account for the change in behavior.
>>>
>>
>> I'm running systemd-216, and I see this in
>> /lib/udev/rules.d/50-udev-default.rules:
>>
>> KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*",
>> GROUP="uucp"
>>
>> I suppose it is possible that some later rule overrides it, but I
>> don't see anything obvious.
>
> Yes, I saw that rule (and it hasn't changed recently).  I also have a
> rule that creates a symlink for a certain USB-serial adapter in
> /etc/udev/rules.d/99-user.rules:
>
> SUBSYSTEMS=="usb",\
>  ATTRS{product}=="FT232R USB UART",\
>  ATTRS{serial}=="AH026Q3X",\
>  KERNEL=="ttyUSB*",\
>  SYMLINK+="ttyDBG",\
>  GROUP="uucp"
>
> I didn't used to need to set the GROUP in that rule, the device file
> just defaulted to having a group of uucp. Yesterday, I had to add the
> "GROUP" command to get the behavior I always used to get without it.

You could try using udevadm test to see what rules are firing.

sudo udevadm test --action=add /sys/class/tty/ttyUSB0

Reply | Threaded
Open this post in threaded view
|

Re: /dev/ttyUSB* group changed from uucp to root?

Grant Edwards-6
On 2014-09-25, Mike Gilbert <[hidden email]> wrote:

> On Thu, Sep 25, 2014 at 11:28 AM, Grant Edwards
><[hidden email]> wrote:
>> On 2014-09-25, Mike Gilbert <[hidden email]> wrote:
>>> On Wed, Sep 24, 2014 at 6:28 PM, Grant Edwards
>>><[hidden email]> wrote:
>>>> On 2014-09-24, Neil Bothwick <[hidden email]> wrote:
>>>>> On Wed, 24 Sep 2014 19:42:56 +0000 (UTC), Grant Edwards wrote:
>>>>>
>>>>>> After an update yesterday, I've noticed that the group assigned to
>>>>>> ttyUSB devices has changed from uucp to root.  Non-USB serial ports
>>>>>> still seem to be uucp.
>>>>>
>>>>> What did you update? They are still root:uucp here.
>>>>
>>>> Several things got updated, but the most likely suspect is probably
>>>> sys-fs/udev-215-r1 => sys-fs/udev-216.  But, I don't see any changes
>>>> in the default rules to account for the change in behavior.
>>>
>>> I'm running systemd-216, and I see this in
>>> /lib/udev/rules.d/50-udev-default.rules:
>>>
>>> KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*",
>>> GROUP="uucp"

The test trace shows that rule setting the group to 14 (uucp).

>>> I suppose it is possible that some later rule overrides it, but I
>>> don't see anything obvious.

It appears to be overridden by

/lib64/udev/rules.d/99-openocd.rules

Which sets the group to 0 (root).  The weird thing is that I don't
know where that file came from.  Dong an "equery belongs" doesn't show
it belonging to any package. I do have dev-embedded/openocd installed,
but it doesn't own that file...  But, doing an emerge -C openocd
removed the file /lib64/udev/rules.d/99-openocd.rules.

It looks like a bug in the openOCD rules is causing it to recognize
somthing that it shouldn't.

Checking the emerge logs shows that openocd was emerged about a week
prior to the udev update (and I must have been mistaken about exactly
when the failure started).

--
Grant


Reply | Threaded
Open this post in threaded view
|

Re: /dev/ttyUSB* group changed from uucp to root?

Mike Gilbert-2
On Fri, Sep 26, 2014 at 12:12 PM, Grant Edwards
<[hidden email]> wrote:
> Which sets the group to 0 (root).  The weird thing is that I don't
> know where that file came from.  Dong an "equery belongs" doesn't show
> it belonging to any package. I do have dev-embedded/openocd installed,
> but it doesn't own that file...  But, doing an emerge -C openocd
> removed the file /lib64/udev/rules.d/99-openocd.rules.
>

udev rules get installed to /lib/udev/rules.d, not /lib64/udev/rules.d.

Most Gentoo systems have a symlink at /lib pointing at /lib64, but
equery does not look at this. It only looks at the contents of
/var/db/pkg/*/*/CONTENTS, which would contain lib instead of lib64.

Reply | Threaded
Open this post in threaded view
|

Re: /dev/ttyUSB* group changed from uucp to root?

Samuli Suominen-4

On 26/09/14 20:59, Mike Gilbert wrote:

> On Fri, Sep 26, 2014 at 12:12 PM, Grant Edwards
> <[hidden email]> wrote:
>> Which sets the group to 0 (root).  The weird thing is that I don't
>> know where that file came from.  Dong an "equery belongs" doesn't show
>> it belonging to any package. I do have dev-embedded/openocd installed,
>> but it doesn't own that file...  But, doing an emerge -C openocd
>> removed the file /lib64/udev/rules.d/99-openocd.rules.
>>
> udev rules get installed to /lib/udev/rules.d, not /lib64/udev/rules.d.
>
> Most Gentoo systems have a symlink at /lib pointing at /lib64, but
> equery does not look at this. It only looks at the contents of
> /var/db/pkg/*/*/CONTENTS, which would contain lib instead of lib64.
>

That's why latest portage-utils supports:

# qfile -b -v 99-openocd.rules

The new -b argument allows to skip the directory.

- Samuli

Reply | Threaded
Open this post in threaded view
|

Re: /dev/ttyUSB* group changed from uucp to root?

Neil Bothwick
On 27 September 2014 03:08:15 BST, Samuli Suominen <[hidden email]> wrote:

On 26/09/14 20:59, Mike Gilbert wrote:
On Fri, Sep 26, 2014 at 12:12 PM, Grant Edwards
<[hidden email]> wrote:
Which sets the group to 0 (root). The weird thing is that I don't
know where that file came from. Dong an "equery belongs" doesn't show
it belonging to any package. I do have dev-embedded/openocd installed,
but it doesn't own that file... But, doing an emerge -C openocd
removed the file /lib64/udev/rules.d/99-openocd.rules.

udev rules get installed to /lib/udev/rules.d, not /lib64/udev/rules.d.

Most Gentoo systems have a symlink at /lib pointing at /lib64, but
equery does not look at this. It only looks at the contents of
/var/db/pkg/*/*/CONTENTS, which would contain lib instead of lib64.


That's why latest portage-utils supports:

# qfile -b -v 99-openocd.rules

The new -b argument allows to skip the directory.

- Samuli


Nice! Thanks for the hint.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.