Bug 249239 - Can not use ptp camera as a non-root user
Can not use ptp camera as a non-root user
Status: CLOSED DUPLICATE of bug 239250
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Harald Hoyer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-23 03:27 EDT by Dennis Björklund
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-23 06:26:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dennis Björklund 2007-07-23 03:27:16 EDT
Since I upgraded to fedora 7 from fedora 6 I can no longer import pictures from
my camera (Canon IXUS 55 talking PTP) as a non-root user.

When I run

  env LANG=C gphoto2 --debug --debug --port "usb:" -L

it report

0.983953 gphoto2-port-usb(1): Looking for USB device (vendor 0x4a9, product
0x30ff)... found.
0.984131 gphoto2-port-usb(1): Detected defaults: config 1, interface 0,
altsetting 0, inep 81, outep 02, intep 83, class 06, subclass 01
0.984309 gphoto2-abilities-list.c(2): Found 'Canon Digital IXUS 55 (PTP mode)'
(0x4a9,0x30ff)
0.984501 gphoto2-port(2): Freeing port...
0.984676 gphoto2-port(2): Closing port...
0.984889 gphoto2-camera(2): Setting abilities ('Canon Digital IXUS 55 (PTP
mode)')...
0.989662 gphoto2-setting(2): Setting key 'model' to value 'Canon Digital IXUS 55
(PTP mode)' (gphoto2)
0.989690 gphoto2-setting(2): Saving 2 setting(s) to file
"/home/dennis/.gphoto/settings"
0.989913 gphoto2-port-info-list(2): Looking for path 'usb:' (6 entries available)...
0.989938 gphoto2-port-info-list(2): Getting info of entry 1 (6 available)...
0.989968 gphoto2-camera(2): Setting port info for port 'Universal Serial Bus' at
'usb:'...
0.990892 gphoto2-port(2): Setting timeout to 5000 millisecond(s)...
0.990916 gphoto2-port(2): Setting settings...
0.990932 gphoto2-setting(2): Setting key 'port' to value 'usb:' (gphoto2)
0.990951 gphoto2-setting(2): Saving 2 setting(s) to file
"/home/dennis/.gphoto/settings"
0.991183 foreach(2): Executing action 'List Files' for folder '/'.
0.993669 gphoto2-camera(2): Listing files in '/'...
0.993721 gphoto2-camera(2): Initializing camera...
0.993759 gphoto2-port-usb(1): Looking for USB device (vendor 0x4a9, product
0x30ff)... found.
0.993793 gphoto2-port-usb(1): Detected defaults: config 1, interface 0,
altsetting 0, inep 81, outep 02, intep 83, class 06, subclass 01
0.993818 gphoto2-camera(2): Loading '/usr/lib/libgphoto2/2.3.1/ptp2'...
0.994148 gphoto2-port(2): Opening USB port...
0.994245 gphoto2-port(0): Could not query kernel driver of device.
0.994279 gphoto2-port(0): Could not claim interface 0 (Operation not permitted).
Make sure no other program or kernel module (such as sdc2xx, stv680, spca50x) is
using the device and you have read/write access to the device.
0.994341 context(0): An error occurred in the io-library ('Could not claim the
USB device'): Could not claim interface 0 (Operation not permitted). Make sure
no other program or kernel module (such as sdc2xx, stv680, spca50x) is using the
device and you have read/write access to the device.

-------------------------

As root it all work and it used to work in fedora 6 and previous versions of
fedora that I've had installed.

I don't know if it is a udev or a gphoto2 problem. But since it work when
executed as root I assume there is some udev rule missing or similar.
Comment 1 Dennis Björklund 2007-07-23 06:04:49 EDT
when I changed the owner of the files in /proc/bus/usb/002/00/* from root to the
local logged in user it worked. I guess it was supposed to be changed by one of
hal/pam/hotplug/udev when the camera is plugged in?
Comment 2 Dennis Björklund 2007-07-23 06:26:34 EDT

*** This bug has been marked as a duplicate of 239250 ***
Comment 3 Harald Hoyer 2007-07-23 09:46:35 EDT
try the devices in /dev/bus/usb/2/0/* ... /proc/bus/usb is deprecated..

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