Johannes Meixner changed bug 938659
What Removed Added
Component Other Basesystem
Summary LIBUSB_ERROR_ACCESS error (insufficient permissions) from "libusb_open" during USB printer device detection udev does not set "rw-rw-r-- root lp" for device node for all USB printers (works mostly but some are missing)
Flags   needinfo?(Markus.Elfring@web.de)

Comment # 4 on bug 938659 from
That "ls -l /dev/bus/usb/<bus_number>/<device_number>" shows
"rw-rw---- root users" is unexpected and perhaps this is
really the root cause of all.

I cannot tell how to change udev rules so that it shows up as
"rw-rw-r-- root lp" automatically.

But only to verify if that unexpected "rw-rw---- root users"
is the root cause, you can change owner, group and permissions
on USB device node files by usual "chown" and "chmod" commands
as long as you do not disconnect and reconnect the USB device
as follows e.g. on my Tumbleweed system:
---------------------------------------------------------------------------
# ls -l /dev/bus/usb/001/002
crw-rw-r-- 1 root lp 189, 1 Jul 20 13:25 /dev/bus/usb/001/002

# chown root:users /dev/bus/usb/001/002

# chmod 0660 /dev/bus/usb/001/002

# ls -l /dev/bus/usb/001/002
crw-rw---- 1 root users 189, 1 Jul 20 13:25 /dev/bus/usb/001/002

# /usr/lib/cups/backend/usb 2>/dev/null
direct usb://Brother/HL-5150D%20series?serial=F5J889574 ...

# lpinfo -v | grep usb:
[no output]

# chmod 0666 /dev/bus/usb/001/002

# lpinfo -v | grep usb:
direct usb://Brother/HL-5150D%20series?serial=F5J889574

# chmod 0664 /dev/bus/usb/001/002

# lpinfo -v | grep usb:
[no output]

# chown root:lp /dev/bus/usb/001/002

# lpinfo -v | grep usb:
direct usb://Brother/HL-5150D%20series?serial=F5J889574

# ls -l /dev/bus/usb/001/002
crw-rw-r-- 1 root lp 189, 1 Jul 20 14:39 /dev/bus/usb/001/002
---------------------------------------------------------------------------

Now I can reproduce it!

With "crw-rw---- root users" running /usr/lib/cups/backend/usb
as root works as expected because root has unlimited permmissions.

With "crw-rw---- root users" it does no longer work
for "lpinfo -v | grep usb:".


Each time when you disconnect and reconnect a USB device
a new USB device node file gets created by udev.

Each time when you disconnect and reconnect your USB printer
you would have to do again
# chown root:lp /dev/bus/usb/<bus_number>/<device_number>
# chmod 0664 /dev/bus/usb/<bus_number>/<device_number>

Markus Elfring
please report if it works for you after manually as root
# chown root:lp /dev/bus/usb/<bus_number>/<device_number>
# chmod 0664 /dev/bus/usb/<bus_number>/<device_number>


You are receiving this mail because: