Bug 239250 - Permission denied importing photos from camera
Permission denied importing photos from camera
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
: 249239 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2007-05-06 21:22 EDT by Andrew Bartlett
Modified: 2013-03-05 22:50 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-18 16:51:12 EDT
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-06 21:22 EDT, Andrew Bartlett
no flags Details
part of lshal output for Canon S3 (1.57 KB, text/plain)
2007-06-15 05:41 EDT, Anton Guda
no flags Details
full lshal output (101.23 KB, text/plain)
2007-06-18 06:04 EDT, Anton Guda
no flags Details
session list (247 bytes, text/plain)
2007-06-18 06:04 EDT, Anton Guda
no flags Details
lshal for Canon IXUS 55 (1.84 KB, text/plain)
2007-07-23 08:22 EDT, Dennis Björklund
no flags Details

  None (edit)
Description Andrew Bartlett 2007-05-06 21:22:41 EDT
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-06 21:22:42 EDT
Created attachment 154236 [details]
logfile as created by gphoto2
Comment 2 Kevin Fenzi 2007-05-07 18:31:42 EDT
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 07:41:29 EDT
I see this too, with a PowerShot A710 IS.
Comment 4 Jindrich Novy 2007-05-23 07:20:38 EDT
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 13:19:23 EDT
hmm, pam_console or HAL?
Comment 6 Anton Guda 2007-06-15 05:41:45 EDT
Created attachment 157082 [details]
part of lshal output for Canon S3
Comment 7 Anton Guda 2007-06-15 05:42:26 EDT
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 09:14:49 EDT
I need

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

Comment 9 Anton Guda 2007-06-18 06:04:00 EDT
Created attachment 157264 [details]
full lshal output
Comment 10 Anton Guda 2007-06-18 06:04:53 EDT
Created attachment 157265 [details]
session list
Comment 11 Anton Guda 2007-06-18 06:07:34 EDT
My distro is "near Rawhide" -- local 
rebuild with some small local changes.

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

Is there any useful output in dmesg? Thanks.
Comment 13 Anton Guda 2007-06-20 07:40:29 EDT
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 10:51:19 EDT
It may be an interference between new kernel
USB naming scheme and old HAL rules.
Comment 15 Dennis Björklund 2007-07-23 06:26:36 EDT
*** Bug 249239 has been marked as a duplicate of this bug. ***
Comment 16 Dennis Björklund 2007-07-23 08:22:34 EDT
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-23 20:10:36 EDT
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 12:43:09 EDT
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-25 20:48:56 EDT
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 07:50:06 EDT
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 12:22:33 EDT
FWIW, the upstream bugfix is


I'll get this into Fedora soon.
Comment 22 James Ettle 2007-08-23 13:47:47 EDT
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 12:59:22 EDT
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 03:09:08 EDT
> /sbin/udevcontrol reload_rules
this is not necessary, because udevd watches all rule files for changes.
Comment 25 James Ettle 2007-09-06 04:28:43 EDT
Even if the file concerned doesn't already exist?
Comment 26 James Ettle 2007-09-10 15:56:08 EDT
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 16:51:12 EDT
Seems to work now.

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