Bug 239250 - Permission denied importing photos from camera
Summary: Permission denied importing photos from camera
Alias: None
Product: Fedora
Classification: Fedora
Component: hal   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: David Zeuthen
QA Contact:
: 249239 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2007-05-07 01:22 UTC by Andrew Bartlett
Modified: 2013-03-06 03:50 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-18 20:51:12 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
logfile as created by gphoto2 (122.70 KB, text/plain)
2007-05-07 01:22 UTC, Andrew Bartlett
no flags Details
part of lshal output for Canon S3 (1.57 KB, text/plain)
2007-06-15 09:41 UTC, Anton Guda
no flags Details
full lshal output (101.23 KB, text/plain)
2007-06-18 10:04 UTC, Anton Guda
no flags Details
session list (247 bytes, text/plain)
2007-06-18 10:04 UTC, Anton Guda
no flags Details
lshal for Canon IXUS 55 (1.84 KB, text/plain)
2007-07-23 12:22 UTC, Dennis Björklund
no flags Details

Description Andrew Bartlett 2007-05-07 01:22:41 UTC
Description of problem:
Cannot import photos from camera.  This may be a hal error, perhaps something
should be setting the permissions on this?

Version-Release number of selected component (if applicable):

How reproducible:
Every time

Steps to Reproduce:
1. Attach cannon powerShot A510 camera
2. run gphoto2 -P
Actual results:
*** Error ***              
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.
*** Error (-53: 'Could not claim the USB device') ***       

Expected results:
Photo download

Additional info:

pertinent lines from strace:
open("/dev/bus/usb/001/003", O_RDWR)    = -1 EACCES (Permission denied)
open("/dev/bus/usb/001/003", O_RDONLY)  = 6
ioctl(6, USBDEVFS_GETDRIVER, 0xbfb81244) = -1 EPERM (Operation not permitted)

Comment 1 Andrew Bartlett 2007-05-07 01:22:42 UTC
Created attachment 154236 [details]
logfile as created by gphoto2

Comment 2 Kevin Fenzi 2007-05-07 22:31:42 UTC
I'm seeing this as well with a canon s700. ;( 
If you manually chmod 666 /dev/bus/usb/X/X it works, so it looks like a
permissions issue from udev or something. 

Comment 3 Jonathan Kamens 2007-05-08 11:41:29 UTC
I see this too, with a PowerShot A710 IS.

Comment 4 Jindrich Novy 2007-05-23 11:20:38 UTC
It's not definitely a bug in gphoto2, so reassigning it to udev. IMO the default
644 permissions for the USB devices don't make too much sense as only read
permissions are useless for USB interface, 660 whould fit better here to have
R/W perms for owner (likely root) and also for people in a specific group. That
would fix the problems you see.

Comment 5 Harald Hoyer 2007-05-24 17:19:23 UTC
hmm, pam_console or HAL?

Comment 6 Anton Guda 2007-06-15 09:41:45 UTC
Created attachment 157082 [details]
part of lshal output for Canon S3

Comment 7 Anton Guda 2007-06-15 09:42:26 UTC
The same result with Canon S3. 
As lshal shows, existed entries like
"info.bus" and so on dont match with
rules in 10-camera-ptp.fdi (hal-info)
and 10-camera-libgphoto2.fdi (old gphoto).

Comment 8 David Zeuthen 2007-06-15 13:14:49 UTC
I need

 - full lshal output
 - output of ck-list-sessions
 - distro version (I assume Rawhide)


Comment 9 Anton Guda 2007-06-18 10:04:00 UTC
Created attachment 157264 [details]
full lshal output

Comment 10 Anton Guda 2007-06-18 10:04:53 UTC
Created attachment 157265 [details]
session list

Comment 11 Anton Guda 2007-06-18 10:07:34 UTC
My distro is "near Rawhide" -- local 
rebuild with some small local changes.

Comment 12 David Zeuthen 2007-06-18 16:31:43 UTC
There's no USB interface for the USB device

Is there any useful output in dmesg? Thanks.

Comment 13 Anton Guda 2007-06-20 11:40:29 UTC
It seems to be a kernel problem. 
On old kernel, similar to rh 3119, all works fine.
Under research now.

Comment 14 Anton Guda 2007-06-22 14:51:19 UTC
It may be an interference between new kernel
USB naming scheme and old HAL rules.

Comment 15 Dennis Björklund 2007-07-23 10:26:36 UTC
*** Bug 249239 has been marked as a duplicate of this bug. ***

Comment 16 Dennis Björklund 2007-07-23 12:22:34 UTC
Created attachment 159777 [details]
lshal for Canon IXUS 55

This is fedora 7 with all updates running


Notice how it say info.subsystem = 'usb' instead of  info.subsystem =
'usb_device' as the other say. Also the file
/usr/share/hal/fdi/policy/10osvendor/20-acl-management.fdi uses 'usbraw" and
there is no such thing as far as I can see.

Does this work for anyone?

Comment 17 Dennis Björklund 2007-07-24 00:10:36 UTC
Seems like it is an issue with the latest kernel. When I tried an earlier 2.6.21
kernel it worked fine.

Comment 18 James Bridge 2007-07-25 16:43:09 UTC
Same here: the most recent 2.6.21 kernel works as expected, with no other changes

System is Fedora 7 x86_64, fully updated
Camera is Fujifilm Finepix S6500fd

Comment 19 David Zeuthen 2007-07-26 00:48:56 UTC
This will get fixed with the next hal update. FYI, for Fedora 7 it should be
fixed with an update; that's tracked in bug 249211.

Comment 20 James Ettle 2007-08-22 11:50:06 UTC
Hmmm... I see this problem with 2.6.21 and 2.6.22 series kernels with a Canon
EOS 400D (error message is "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."). Only think I
can think has been updated recently is udev.


Comment 21 David Zeuthen 2007-08-22 16:22:33 UTC
FWIW, the upstream bugfix is


I'll get this into Fedora soon.

Comment 22 James Ettle 2007-08-23 17:47:47 UTC
David, I tried the above patch but I'm still having no luck. Might I be missing
some udev rules?

Comment 23 James Ettle 2007-09-05 16:59:22 UTC
After running

    /usr/lib/libgphoto2/print-camera-list udev-rules mode 0666 > \
    /sbin/udevcontrol reload_rules

it appears to be working again.

Comment 24 Harald Hoyer 2007-09-06 07:09:08 UTC
> /sbin/udevcontrol reload_rules
this is not necessary, because udevd watches all rule files for changes.

Comment 25 James Ettle 2007-09-06 08:28:43 UTC
Even if the file concerned doesn't already exist?

Comment 26 James Ettle 2007-09-10 19:56:08 UTC
Finally tracked down the problem to a corrupt /var/lib/hal/acl-list --- the USB
device node ACL wasn't being set correctly. So it now works without the udev hack.

Comment 27 David Zeuthen 2007-09-18 20:51:12 UTC
Seems to work now.

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