Place USB and PC Card smartcard readers into user-readable group

Bug #85003 reported by Alex Mauer
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ccid (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Jaunty by Alex Mauer
udev (Ubuntu)
Invalid
Wishlist
Unassigned
Nominated for Jaunty by Alex Mauer

Bug Description

Udev should probably set permissions to allow users to access USB and PC card smartcard readers. This enables the use of (e.g.) smartcards without using pcscd. Example rule and script files at http://fsfe.org/en/card/howto/card_reader_howto_udev

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

The linked files are bogus, since it uses a script to set permissions, which udev can do itself.

The suggested rules are:

SUBSYSTEM!="usb", GOTO="ccid_rules_end"
ACTION!="add", GOTO="ccid_rules_end"

ATTR{idVendor}=="04e6", ATTR{idProduct}=="e003", MODE="0660", GROUP="scard"
ATTR{idVendor}=="04e6", ATTR{idProduct}=="5115", MODE="0660", GROUP="scard"

LABEL="ccid_rules_end"

Changed in udev:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Alex Mauer (hawke) wrote :

Now that a correct solution has been found, what will it take to get this into Ubuntu?

Revision history for this message
Alex Mauer (hawke) wrote :

Of course, it appears that a correct solution has not been found.

The example rules file creates device files like /dev/1-1 with the described permissions and ownership. It does not affect the files /dev/bus/usb/*/* which gnupg accesses, and so non-root users still can't access the smart card.

Revision history for this message
Alex Mauer (hawke) wrote :

Hmm, this seems to work fine now. (though gpg2 still seems to have trouble with accessing the smart card as non-root. Modifications should probably be made to the udev rules files for libccid, which provides some rules for those devices already.

Revision history for this message
Alex Mauer (hawke) wrote :

This belongs to libccid and not udev since ccid already has rules for these devices.

Changed in udev:
status: Confirmed → Invalid
Revision history for this message
Alex Mauer (hawke) wrote :
Revision history for this message
Alex Mauer (hawke) wrote :

I have added a patch which sets the permissions as they should be. It does require that the group 'scard' exist though.

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

I (libccid upstream and Debian maintainer) plan to add this support in the driver.
I just don't know when.

Daniel T Chen (crimsun)
Changed in ccid:
status: New → Confirmed
Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

The group I plan to use will be named "pcscd" instead of "scard" and is designed to be used by the pcscd process only and not by a normal user.

GnuPG implements its own and direct CCID driver. I think this is an error. GnuPG can also use the PC/SC API as any other (normal) smart card application. Using a direct access to the smart card reader is not the way I (as pcsc-lite and libccid maintainer) want to go. So this bug will never be fixed by me (or in Debian).

See http://ludovicrousseau.blogspot.com/2010/09/pcscd-auto-start.html

Changed in ccid (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.