Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Under Ubuntu22.04 hotplugtest result in No access to device: Access denied (insufficient permissions) #1514

Closed
brmarkus opened this issue Jun 17, 2024 · 1 comment
Labels
question Technical support, will be closed if deemed not a libusb issue. Please use mailing list.

Comments

@brmarkus
Copy link

Coming from "https://libusb.info/", which states:

It is user-mode: No special privilege or elevation is required for the application to communicate with a device.

However, when running hotplugtest and insert/eject a USB storage (simple USB mass storage pen drive, 32GB) I get the following:

$> ./hotplugtest
Device detached: 0951:1621
Device attached: 0951:1621
No access to device: Access denied (insufficient permissions)

Is it expected to require root privileges (under Linux) to request device details like Manufacturer, Vendor, Product, SerialNumber?

Running under Ubuntu 22.04LTS.
Kernel 6.5.0-35
libusb from "libusb-1.0.27.tar.bz2"

@tormodvolden tormodvolden added the question Technical support, will be closed if deemed not a libusb issue. Please use mailing list. label Jun 17, 2024
@tormodvolden
Copy link
Contributor

Yes, the system can protect devices against non-privileged user access. It is the same as you cannot usually do "echo hello > /dev/sda1". So if you don't have write access to the device node /dev/bus/usb/xxx/yyy you cannot send control transfers to request device details. The kernel has however already retrieved and cached some of this information, so you can find them under /sys/bus/usb/devices . There are some ideas about enhancing libusb to report these values without the user having to open the device, see #1258.

@libusb libusb locked and limited conversation to collaborators Jun 17, 2024
@mcuee mcuee converted this issue into discussion #1515 Jun 17, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Technical support, will be closed if deemed not a libusb issue. Please use mailing list.
Projects
None yet
Development

No branches or pull requests

2 participants