I am getting an "Access Denied" on a USB port '/dev/bus/usb/001/004' on a Raspberry Pi 3B/4/4B that is running Raspbian Lite.
When I issue the command:
ls -l /dev/bus/001/004
I see the following:
crw-rw-r-- 1 root root 189, 3 Jan 6 13:45 /dev/bus/usb/001/004
The current user is a member of the following groups:
pi adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c gpio
While the current user is a member of the
dialout
group that is often cited as a requirement to access USB ports, the USB port itself is only a member of theroot
group.When I look at the UDEV rules in
/lib/udev/rules.d
, there is a rules file named40-usb_modeswitch.rules
. This file, however, is empty.
My questions are:
- Am I on the right track in thinking that I need to enable the USB ports by adding entries to the
40-usb_modeswitch.rules
? - Do I need to add rules to the
60-serial.rules
file? - Will this add the USB ports to the
dialin
group? - Are there references on how to enable USB ports on a Raspberry Pi 3B/4/4B?
/dev
node, and one that is pretty abstract in practice: When you plug in a USB device such as a keyboard or hard drive, this usually creates a new dev node with separate permissions and ownership -- but none of this stuff requires a user have permission on, eg.,/dev/input/mouse0
in order to make normal use of the mouse. Make sure you don't have an XY problem.