smart card + gpg only root

Werner Koch wk at gnupg.org
Wed Jul 20 15:03:05 CEST 2005


On Wed, 20 Jul 2005 13:13:00 +0200, Federico Munerotto said:

> gpg: DBG: ccid-driver: usb_claim_interface failed: -1

The USB device can't be accessed.  This is a permission problem with
the usbfs.

> (ID=058F:9520:X:0)

Use lsusb to figure out the device like:

$ lsusb
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
Bus 001 Device 002: ID 058f:9254 Alcor Micro Corp. Hub
Bus 001 Device 011: ID 046d:0a02 Logitech, Inc. 
Bus 001 Device 014: ID 04e6:e003 SCM Microsystems, Inc. 

You should find a line with the ID 058F:9520.  Assuming this is the
6th line you now do a:

$ ls -l /proc/bus/usb/001/014
-rw-rw-r--    1 root     scard    18 Jul 20 11:13 /proc/bus/usb/001/014

The above is correct but I guess that the permissions are not correct
for you.  If setup as suggested by the HOWTO then the hotplug scripts
should take care of it.

Soem systems have a bug in the scripts and require a 0x0 instead of a
just a 0.  If you used the scripts verbatim you should fix them:

  # Generic CCID device
  gnupg-ccid  0x0080  0x0    0x0    0 0 0 0 0x00 0x0B 0x00 0x00 0x00000000
  # SPR532 is CCID but without the proper CCID class
  gnupg-ccid  0x0003  0x04e6 0xe003 0 0 0 0 0x00 0x0B 0x00 0x00 0x00000000
  # SCR33x is CCID but without the proper CCID class
  gnupg-ccid  0x0003  0x04e6 0x5115 0 0 0 0 0x00 0x0B 0x00 0x00 0x00000000

to  

  # Generic CCID device
  gnupg-ccid  0x0080  0x0 0x0 0x0 0x0 0x0 0x0 0x00 0x0B 0x00 0x00 0x00000000
  ....

[Yes, I need to upload a revision of the HOWTO.]

The change above should be sufficient.  If this all does not work you
might want to manually chmod and chgrp the device for now and then
figure out what's wrong with the hotplug scripts.

If you made this reader work for you, please tell me the type so that
I can put it into our list of verified readers.


hth,

  Werner




More information about the Gnupg-users mailing list