Bug 349691

Summary: Can't import from camera
Product: [Fedora] Fedora Reporter: Espen Stefansen <libbe>
Component: gphoto2Assignee: Jindrich Novy <jnovy>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: davidz, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-28 13:19:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Espen Stefansen 2007-10-23 22:29:32 UTC
Description of problem:
Trying to import from camera. First problem is that the import-dialog doesn't 
show when the camera is turned on. Second is that when I start the gthumb-
import, i get this message: 
An error occurred in the io-library ('Could not claim the USB device'): Could 
not claim interface 0 (Operasjonen er ikke tillatt). 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.

If i start it on the commandline, i also get this message:
process 9005: arguments to dbus_message_new_method_call() were incorrect, 
assertion "_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 
1074.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace

If i start gthumb-import as root, it works perfectly.


Version-Release number of selected component (if applicable):
gthumb-2.10.7-1.fc8

How reproducible:
Every time

Steps to Reproduce:
1. Connect camera
2. 
3.
  
Actual results:
Import-dialog doesn't start up automatically. And i can't import.

Expected results:the dialog should pop up and import pictures.


Additional info:
lsusb:
Bus 005 Device 004: ID 04a9:304d Canon, Inc. Digital IXUS 300

Comment 1 Matthias Clasen 2007-10-25 14:02:05 UTC
David, is this an acl problem ?

Comment 2 Matti Lehti 2007-11-04 09:46:17 UTC
I have the same problem with Canon Powershot A40, kernel 2.6.23.1-42.fc8 and
gthumb-2.10.7-1.fc8. There was similar problem with Fedora 7, see bug 249211.

I checked that the import dialog does not start automatically even if logged in
as root. Manual import works fine as root.

Comment 3 Andrew Zabolotny 2007-11-08 20:04:39 UTC
Same here, Fedora 7 with all latest updates as of 7-Nov-2007.

Camera: Canon Ixux 65 (04a9:30fe).

When running gthumb-import the following error is displayed:

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.

Problem is that there aren't enough permissions on /dev/usb/*/* devices. Here's
a relevant piece of the strace output:

Running as normal user:

open("/dev/bus/usb/007/013", O_RDWR) = -1 EACCES (Permission denied)
open("/dev/bus/usb/007/013", O_RDONLY) = 23
ioctl(23, USBDEVFS_CONNECTINFO, 0x41dff4f0) = -1 EPERM (Operation not permitted)

Running as root:

open("/dev/bus/usb/007/013", O_RDWR) = 21
ioctl(21, USBDEVFS_CONNECTINFO, 0x41dff4f0) = 0

# ls -la /dev/bus/usb/007/013
crw-r--r-- 1 root root 189, 782 Ноя  8 22:59 /dev/bus/usb/007/013

It looks like there's a missing udev rule to set the proper permissions on
/dev/bus/usb/* ? Doing a chmod a+w on the device above makes gthumb-import work.

Maybe all usb devices inserted after login should be owned by the current
console user.

See also bug #182039, bug #186131, bug #238885, they all seems related to this
problem.


Comment 4 Espen Stefansen 2007-11-28 12:17:54 UTC
With the latest kernel and gphoto from koji, everything works as it should. :) 
So this can be closed now.

gphoto2-2.4.0-4.fc8
kernel-2.6.23.9-67.fc8

Comment 5 Jindrich Novy 2007-11-28 13:19:59 UTC
Yup, marking as duplicate.

*** This bug has been marked as a duplicate of 400491 ***