Bug 563566 - Incorrect UDEV rule prevents user access to FT2232-based devices
Summary: Incorrect UDEV rule prevents user access to FT2232-based devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libftdi
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Lucian Langa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-10 16:01 UTC by Jeff Gough
Modified: 2011-11-28 15:29 UTC (History)
3 users (show)

Fixed In Version: libftdi-0.16-7.fc11
Clone Of:
Environment:
Last Closed: 2010-04-09 04:30:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jeff Gough 2010-02-10 16:01:48 UTC
Description of problem:

libftdi installs a udev rule called 99-libftdi.rules which contains the line

# allow users to claim the device
SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0664", GROUP="plugdev"

to make devices based on the FT2232 chip available to members of the plugdev group. It doesn't work - the device remains owned by root.

Solution:
Changing SUBSYSTEM=="usb_device" to SUBSYSTEM=="usb" fixes the problem, but I don't know enough about udev to guarantee that it's the correct solution.


Version-Release number of selected component (if applicable): libftdi-0.16-6.fc11.i586


How reproducible: always


Steps to Reproduce:
1. plug in FT2232-based USB device
2. try to use device as member of plugdev
  
Actual results: Error: could not set config 1: Operation not permitted

Expected results: ftdi_usb_open() should return without error

Additional info: this bug may extend to more recent Fedora versions, I haven't tested it.

Comment 1 Fedora Update System 2010-03-13 08:51:38 UTC
libftdi-0.16-7.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/libftdi-0.16-7.fc11

Comment 2 Fedora Update System 2010-03-13 08:52:43 UTC
libftdi-0.17-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/libftdi-0.17-2.fc12

Comment 3 Fedora Update System 2010-03-13 08:53:20 UTC
libftdi-0.17-3.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/libftdi-0.17-3.fc13

Comment 4 Fedora Update System 2010-03-14 13:42:37 UTC
libftdi-0.17-3.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libftdi'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/libftdi-0.17-3.fc13

Comment 5 Fedora Update System 2010-03-16 00:32:46 UTC
libftdi-0.16-7.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libftdi'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/libftdi-0.16-7.fc11

Comment 6 Fedora Update System 2010-03-16 00:37:48 UTC
libftdi-0.17-2.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libftdi'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/libftdi-0.17-2.fc12

Comment 7 Fedora Update System 2010-04-09 04:30:55 UTC
libftdi-0.17-3.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2010-04-10 10:19:34 UTC
libftdi-0.17-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2010-04-10 10:22:16 UTC
libftdi-0.16-7.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Maxim Cournoyer 2011-07-12 12:32:09 UTC
This seems to be broken in Fedora 15. I installed libftdi, and it pulled the file /etc/udev/rules.d/99-libftdi.rules. I noticed that I was not part of the plugdev group, so I added myself to it by issuing a 'usermod -a -G plugdev $USERNAME'.

I still cannot access the usb device with openocd as a user (using root it works). It says: "Error: unable to open ftdi device: usb_open() failed".

The content of my 99-libftdi.rules is:
# allow users to claim the device
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0664", GROUP="plugdev"

Comment 11 Thomas Jarosch 2011-11-28 15:29:23 UTC
I've commited something like this in libftdi upstream:
http://developer.intra2net.com/git/?p=libftdi;a=commitdiff;h=6219bae79ced0e80c85225c4f1c0e40ff665d356

We just need to clarify if the udev "subsystem" should be "usb" or "usb_device". Any idea?


Note You need to log in before you can comment on or make changes to this bug.