You are not logged in.

#1 2025-10-26 18:30:32

diederick76
Member
Registered: 2010-02-14
Posts: 164

[SOLVED] How do I control ownership of /dev/bus/usb

When I connect my Palm handheld to a USB port, two devices in /dev/ are created:

$ ls -l /dev/ttyUSB*                                         
crw-rw---- 1 root uucp 188, 0 26 okt 19:16 /dev/ttyUSB0
crw-rw---- 1 root uucp 188, 1 26 okt 19:16 /dev/ttyUSB1

Using

$ lsusb | grep Palm
Bus 005 Device 008: ID 0830:0061 Palm, Inc. Lifedrive / Treo 650/680 / Tunsten E2/T5/TX / Centro / Zire 21/31/72 / Z22

I can find out the bus and device, so I can see the file that is created under /dev/bus/usb:

$ cd /dev/bus/usb/005
$ ls -l 008
crw-rw-r-- 1 root root 189, 519 26 okt 19:16 008

This is the file that JPilot needs to be able to synchronise with the handheld. I'm not a fan of making my user a member of the root group to have JPilot read and write to that file. Seeing as udevs 20-usb-vendor-model.hwdb has a string suspiciously like the one lsusb returned, I assume that systemd/udev is ultimately responsible for the device files in /dev as well as the one in /dev/bus/usb/. Udev documentation however explains in detail how to intercept and influence the device files in /dev but not the other ones.

How can I either change the file's rights to 666 or change group ownership to something like palm or uucp?

Last edited by diederick76 (2025-10-27 07:02:27)

Offline

#2 2025-10-26 20:35:23

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,875

Re: [SOLVED] How do I control ownership of /dev/bus/usb

https://wiki.archlinux.org/title/Udev#Example

udevadm info --attribute-walk --path=$(udevadm info --query=path --name=/dev/bus/usb/005/008)

Does

ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0830", ATTRS{idProduct}=="0061", GROUP="uucp"

not work?

Offline

#3 2025-10-26 20:56:44

diederick76
Member
Registered: 2010-02-14
Posts: 164

Re: [SOLVED] How do I control ownership of /dev/bus/usb

Does

ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0830", ATTRS{idProduct}=="0061", GROUP="uucp"

not work?

Yes,  now it owned by group uucp, and it rw:

$ lsusb | grep Palm
Bus 001 Device 008: ID 0830:0061 Palm, Inc. Lifedrive / Treo 650/680 / Tunsten E2/T5/TX / Centro / Zire 21/31/72 / Z22
$ ls -l /dev/bus/usb/001/008
crw-rw-r-- 1 root uucp 189, 7 26 okt 21:53 /dev/bus/usb/001/008

So if I understand you correctly, the files under /dev/bus/usb should also be affected by udev rules then?

Offline

#4 2025-10-26 21:08:51

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,875

Re: [SOLVED] How do I control ownership of /dev/bus/usb

Should™? Are! wink
ttyUSB0 likely isn't even part of the usb subsystem (but tty?)

Generally the attribute-walk will hand you all relevant information for a udev match pattern - for any device.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB