Reputation: 21
I'm programming in C with Anjuta a small application with libusb library.
libusb has need the write rights for some purpose.
This argoment was already dealt in this topic: "Get access to USB device on Linux (libusb-1.0)?".
Maybe the topic solution work fine (I'm not tried yet) but i would like my application access to all usb device and not to the specific one.
i've tried to set a suid bit at a libusb-1.0.so file which have a root owner but libusbopen function, for example, answer "libusb requires write access to USB device nodes" again.
I don't wont to build the entire anjuta project as root user but so far this is the only solution for this libusb-1.0 issue.
Is there a solution for get write access to inode of a general usb device (for example hot plug pendrive) without modify udev behavior?
Upvotes: 0
Views: 1075
Reputation: 21
I have found a workaround. Maybe it's not good but it seems to work well.
I have added a permission rules file (020_permissions.rules
) in the udev configuration directory (/etc/udev/rules.d
) where the unique rule is which Unix group should own all the USB device nodes.
The file content is:
SUBSYSTEM=="usb", GROUP=="group to belong my user"
I hope this helps you if you have a similar libusb issue.
Upvotes: 0