Bug 426879 - permissions not correctly set for PTP camera
permissions not correctly set for PTP camera
Product: Fedora
Classification: Fedora
Component: gphoto2 (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: David Zeuthen
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2007-12-27 15:47 EST by Bob T.
Modified: 2013-03-05 22:54 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-21 18:21:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt -L (156.73 KB, text/plain)
2008-04-13 03:08 EDT, Axel Thimm
no flags Details
lshal output shortlz after plugging in the camera (114.05 KB, text/plain)
2008-04-14 13:05 EDT, Axel Thimm
no flags Details
ACLs of usb devices (1.47 KB, text/plain)
2008-04-14 13:12 EDT, Axel Thimm
no flags Details

  None (edit)
Description Bob T. 2007-12-27 15:47:39 EST
Description of problem:

usb connection recognized but gphoto2/gthumb etc. fail to access images. Root
has no problems.

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



How reproducible:


Steps to Reproduce:
1.plug in camera
2.try to import images
Actual results:

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.

Expected results:

driver loading

Additional info:


Making MODE changes as suggested works but presumably this is not a permanent
and secure fix.

This problem seems to come up regularly!  Isn't it about time it got checked
before release?
Comment 1 Duncan Innes 2008-01-02 03:06:53 EST
Possibly need to get a fix out the door quickly on this.  It becomes more of an 
image issue (i.e. how many times does Fedora drop the ball on little niggles 
like this).  These are the things that take the lustre off a polished release.

P.S. I don't have a PTP camera, so am not waiting for a fix.  I know 2 people 
who are waiting, however, so am monitoring on their behalf.
Comment 2 Harald Hoyer 2008-02-20 05:57:01 EST
$ rpm -qf /usr/share/hal/fdi/information/10freedesktop/10-camera-ptp.fdi

Comment 3 Axel Thimm 2008-04-12 13:34:43 EDT
For F9 the workaround mentioned in comment #0 does not work anymore. Actually
even root gets this error message now.

Should I open a separate bug for rawhide?
Comment 4 David Zeuthen 2008-04-12 13:50:31 EDT
This was fixed Monday with the latest hal package

Comment 5 Axel Thimm 2008-04-13 02:56:33 EDT
(In reply to comment #4)
> This was fixed Monday with the latest hal package
> http://cvs.fedoraproject.org/viewcvs/devel/hal/hal.spec?r1=1.152&r2=1.153

That's the hal I was using when writing comment #3. Actually I was using an even
more recent version:
Comment 6 Axel Thimm 2008-04-13 03:08:00 EDT
Created attachment 302255 [details]
env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt -L

Both gthumb-import and gphoto2 still fail on rawhide. I added the gphoto2 debug
Comment 7 David Zeuthen 2008-04-13 16:28:39 EDT
The gphoto2 output is not very useful. Please attach the output of 'lshal' and
the output of 'getfacl `find /dev/bus/usb`' instead. Thanks.
Comment 8 David Zeuthen 2008-04-13 16:29:13 EDT
And also the output of 'ck-list-sessions'. Thanks.
Comment 9 Axel Thimm 2008-04-14 13:04:07 EDT
$ ck-list-sessions 
	uid = '501'
	realname = 'Axel Thimm'
	seat = 'Seat1'
	session-type = ''
	active = TRUE
	x11-display = ':0'
	x11-display-device = '/dev/tty7'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2008-04-14T16:41:56Z'
Comment 10 Axel Thimm 2008-04-14 13:05:08 EDT
Created attachment 302366 [details]
lshal output shortlz after plugging in the camera
Comment 11 Axel Thimm 2008-04-14 13:12:01 EDT
Created attachment 302367 [details]
ACLs of usb devices

The relevant part is probably

# file: dev/bus/usb/005/003
# owner: root
# group: root

Note that the 0666 mode is due to trying the workaround quoted above. So
permissions look like fully set, but the camera will still refuse to work with
the ioerror.
Comment 12 Axel Thimm 2008-04-14 13:18:44 EDT
BTW, there are two gthumb-import instances being invoked in series when plugging
in the camera. Not sure this makes any difference to this bug, but I thought
perhaps they lock eachother off the camera.

But I tried to call gthumb-import manually also, and the result is the same (but
it also does ask again about importing). Calling it from the commandline reveals
some more output:

$ gthumb-import 
libhal.c 1310 : invalid udi:  doesn't startwith '/org/freedesktop/Hal/devices/'. 
error: libhal_device_get_property_type: (null): (null)
Comment 13 David Zeuthen 2008-04-15 13:04:46 EDT
Permissions does look about right. Looks to me like a gthumb problem...
Comment 14 David Zeuthen 2008-04-15 13:06:29 EDT
Actually this is a gnome-volume-manager problem as that file comes from that
Comment 15 Axel Thimm 2008-04-21 18:21:48 EDT
The original bug (permissions) is fixed, I moved the discussion of the timeout
problem to bug #443515.

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