LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-24-2007, 08:50 PM   #1
Sorab
LQ Newbie
 
Registered: Apr 2007
Location: Honolulu, Hawaii, USA
Distribution: Fedora Core 6
Posts: 3

Rep: Reputation: 0
LIBUSB - usb driver with non-root credentials


- I am trying to connect a USB device (driver for which is written using libusb) with non-root credentials...the app. runs fine with root credentials. I am running fedora core 6 ( 2.6.20-1.2933.fc6).

- The udev persmissions file /etc/security/console.perms.d/ispvme.perms has -
<ispvme>=/dev/ispvme* <console> 0600 <ispvme> 0600 root

- The /etc/udev/rules.d/76-ispvme.rules for PAM has :
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="8001", SYSFS{idProduct}=="1134", SYMLINK+="ispvme-%k"

After skill of udevd and respawn, {$/sbin/lsusb} spits the following when the device is connected-
Bus 005 Device 005: ID 1134:8001.

It never lists the device with the symbolic link "ispvme-*" under /dev/ and I cannot run the app. with non-root credentials.

I am really at my wits end with this issue. You see anything wrong with any of the above settings? Any inputs will be greatly appreciated...

Thank you.

PS - This is what udev.conf file bears -

udev_root="/dev/"
udev_db="/dev/.udevdb"
udev_rules="/etc/udev/rules.d/"
udev_permissions="/etc/udev/permissions.d/"
default_mode="0660"
udev_log="err"

Last edited by Sorab; 04-24-2007 at 09:16 PM.
 
Old 04-25-2007, 04:33 PM   #2
Sorab
LQ Newbie
 
Registered: Apr 2007
Location: Honolulu, Hawaii, USA
Distribution: Fedora Core 6
Posts: 3

Original Poster
Rep: Reputation: 0
Cool Issue Resolved.

Summary of what I did to fix this issue for the forum posterity-

Step 1:
Modify /etc/udev/udev.conf and ensure that it atleast has following settings-

udev_root="/dev/"
udev_db="/dev/.udevdb"
udev_rules="/etc/udev/rules.d/"
udev_permissions="/etc/udev/permissions.d/"
default_mode="0660"
udev_log="err"

Step 2:
Create udev rules file OR append to exisiting /etc/udev/rules.d/10-local.rules:

#your_usb_device - foo
KERNEL=="*[0-9]", SUBSYSTEM=="usb_device", ACTION=="add",SYSFS{idVendor}=="xxxx", SYSFS{idProduct}=="xxxx", SYMLINK+="foo-%k"

Step 3:
Create PAM rules file /etc/security/console.perms.d/foo.perms:

<foo>=/dev/foo* <console> 0600 <foo> 0600 root

Step 4:
Respawn udev deamon and run the newly created rules.
$skill udedv
$/sbin/udevd -d
 
Old 04-28-2017, 07:40 AM   #3
ani.alvarez
LQ Newbie
 
Registered: Apr 2017
Location: Pola de Lena, Spain
Distribution: Ubuntu
Posts: 5

Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by Sorab View Post
Summary of what I did to fix this issue for the forum posterity-

Step 1:
Modify /etc/udev/udev.conf and ensure that it atleast has following settings-
I'm sorry but, how it's sopouse to modify the udev.conf file if I cannot access to /etc with write permisions???
 
  


Reply

Tags
libusb, permissions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
driver help with libusb halfwit Linux - Hardware 19 01-23-2008 12:59 AM
WPA2, EAP-MSCHAP v2, credentials, and Trusted Root Certification Authority kramed Linux - Wireless Networking 7 04-04-2007 11:22 PM
libusb and C quesition - simple USB driver vargadanis Programming 2 01-14-2007 01:33 PM
RHEL3 Mounting USB after reboot and between reboots: root and non-root users Luis Nunes Linux - Hardware 0 07-20-2005 08:32 AM
Libusb devices only accessable as root qwijibow Linux - Software 3 09-29-2004 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration