Experimental Physics and Industrial Control System
Hi Jörn,
Thanks, indeed all of the udev rules files on my Centos 9 systems are in /usr/lib/udev/rules.d, not in /etc/udev/rules.d. The file that changes the permissions for the Measurement Computing devices is 50-uldaq.rules. It is present in /usr/lib/udev/rules.d on all of the systems that I use with Measurement Computing devices. It gets installed when one builds their uldaq library from source.
Thanks,
Mark
-----Original Message-----
From: Jörn Dreyer <j.dreyer at hzdr.de>
Sent: Monday, September 25, 2023 10:47 PM
To: tech-talk at aps.anl.gov
Cc: Mark Rivers <rivers at cars.uchicago.edu>
Subject: Re: USB permissions
Hi Mark,
on some systems, especially those with systemd, there is another directory where udev looks for rules files. Did you check in
/usr/lib/udev/rules.d
for a file that might set the permissions for those devices?
Regards
Jörn
Am Montag, 25. September 2023, 23:52:10 CEST schrieb Mark Rivers via Tech-
talk:
> Folks,
>
> I am seeing something I don't understand about USB device permissions
> on Linux. I have two Centos 9 systems, each connected to 3 USB
> devices from Measurement Computing.
>
> On the system called 13ide I needed to install a udev rules file in
> order to give these USB devices world write permission.
>
> This is part of the rules file:
>
> (base) [epics@13ide ~]$ more /etc/udev/rules.d/50-uldaq.rules
> SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0076",
> GROUP="adm", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="09db",
> ATTR{idProduct}=="007f", GROUP="adm", MODE="0666" SUBSYSTEM=="usb",
> ATTR{idVendor}=="09db", ATTR{idProduct}=="0085", GROUP="adm", MODE="0666"
> SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0086",
> GROUP="adm", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="09db",
> ATTR{idProduct}=="008a", GROUP="adm", MODE="0666"
>
> lsusb shows that the devices are on bus 002, devices 005, 007, and 008.
>
> (base) [epics@13ide ~]$ lsusb
> Bus 002 Device 009: ID 0557:2259 ATEN International Co., Ltd LCD
> Console
> V1.3.124 Bus 002 Device 006: ID 0557:2259 ATEN International Co., Ltd
> LCD Console V1.3.124 Bus 002 Device 004: ID 0557:8021 ATEN
> International Co., Ltd Hub Bus 002 Device 008: ID 09db:013e
> Measurement Computing Corp. USB-1808X Bus 002 Device 007: ID 09db:009d
> Measurement Computing Corp. USB-3104 Bus 002 Device 005: ID 09db:0127
> Measurement Computing Corp. USB-CTR08
>
> This shows that those devices have permission 666 and are owned by the "adm"
> group.
>
> (base) [epics@13ide ~]$ ls -l /dev/bus/usb/002 total 0
> crw-rw-r-- 1 root root 189, 128 Sep 19 11:45 001
> crw-rw-r-- 1 root root 189, 129 Sep 19 11:45 002
> crw-rw-r-- 1 root root 189, 130 Sep 19 11:45 003
> crw-rw-r-- 1 root root 189, 131 Sep 19 11:45 004
> crw-rw-rw- 1 root adm 189, 132 Sep 19 11:45 005
> crw-rw-r-- 1 root root 189, 133 Sep 19 11:45 006
> crw-rw-rw- 1 root adm 189, 134 Sep 19 11:45 007
> crw-rw-rw- 1 root adm 189, 135 Sep 19 11:45 008
> crw-rw-r-- 1 root root 189, 136 Sep 19 11:45 009
>
> This makes sense to me because permission 666 and group "adm" are in
> the 50-uldaq.rules file.
>
> However, I have another system which does not have a udev rules file
> in that location.
>
> [epics@13idc ~]$ ls -l /etc/udev/rules.d/ total 0
>
> On that system the devices are on bus 001, devices 004, 005, and 006.
>
> [epics@13idc udev]$ lsusb
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001
> Device 010: ID 1604:10c0 Tascam Dell Integrated Hub Bus 001 Device
> 009: ID 413c:a102 Dell Computer Corp. iDRAC Virtual NIC Bus 001 Device
> 007: ID 1604:10c0 Tascam Dell Integrated Hub Bus 001 Device 003: ID
> 1604:10c0 Tascam Dell Integrated Hub Bus 001 Device 006: ID 09db:013e
> Measurement Computing Corp. USB-1808X Bus 001 Device 005: ID 09db:009d
> Measurement Computing Corp. USB-3104 Bus 001 Device 004: ID 09db:0127
> Measurement Computing Corp. USB-CTR08 Bus 001 Device 002: ID 0409:005a
> NEC Corp. HighSpeed Hub Bus 001 Device 001: ID 1d6b:0002 Linux
> Foundation 2.0 root hub
>
> The following shows that these devices also have permissions 666 and
> are in the "adm" group.
>
> [epics@13idc udev]$ ls -l /dev/bus/usb/001 total 0
> crw-rw-r-- 1 root root 189, 0 Sep 19 12:09 001
> crw-rw-r-- 1 root root 189, 1 Sep 19 12:09 002
> crw-rw-r-- 1 root root 189, 2 Sep 19 12:09 003
> crw-rw-rw- 1 root adm 189, 3 Sep 19 12:09 004
> crw-rw-rw- 1 root adm 189, 4 Sep 19 12:09 005
> crw-rw-rw- 1 root adm 189, 5 Sep 19 12:09 006
> crw-rw-r-- 1 root root 189, 6 Sep 19 12:09 007
> crw-rw-r-- 1 root root 189, 8 Sep 19 12:09 009
> crw-rw-r-- 1 root root 189, 9 Sep 19 12:09 010
>
> I don't understand this, since there is no rules file. How did it
> know to assign these permissions and group? Is there another
> mechanism by which USB devices get permissions assigned?
>
> Thanks,
> Mark
- Replies:
- Re: USB permissions Guruswamy, Tejas via Tech-talk
- References:
- USB permissions Mark Rivers via Tech-talk
- Re: USB permissions Jörn Dreyer via Tech-talk
- Navigate by Date:
- Prev:
Re: USB permissions Mark Rivers via Tech-talk
- Next:
undefined reference to symbol 'pvar_dset_asynInt32ArrayWfIn' Peter Pitfield via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
<2023>
2024
- Navigate by Thread:
- Prev:
Re: USB permissions Mark Rivers via Tech-talk
- Next:
Re: USB permissions Guruswamy, Tejas via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
<2023>
2024