Bug 426879 - permissions not correctly set for PTP camera
Summary: permissions not correctly set for PTP camera
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gphoto2
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: David Zeuthen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-27 20:47 UTC by Bob T.
Modified: 2013-03-06 03:54 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-04-21 22:21:48 UTC
Type: ---
Embargoed:


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

Description Bob T. 2007-12-27 20:47:39 UTC
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):

udev-116-3.fc8

kernel-2.6.23.9-85.fc8

How reproducible:

always

Steps to Reproduce:
1.plug in camera
2.try to import images
3.
  
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:

http://www.fedoraforum.org/forum/showthread.php?t=170607&page=1&pp=15&highlight=camera

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 08:06:53 UTC
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 10:57:01 UTC
$ rpm -qf /usr/share/hal/fdi/information/10freedesktop/10-camera-ptp.fdi
/usr/share/hal/fdi/policy/10osvendor/20-acl-management.fdi

hal-info-20071030-1.fc8
hal-0.5.10-1.fc8


Comment 3 Axel Thimm 2008-04-12 17:34:43 UTC
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 17:50:31 UTC
This was fixed Monday with the latest hal package

http://cvs.fedoraproject.org/viewcvs/devel/hal/hal.spec?r1=1.152&r2=1.153

Comment 5 Axel Thimm 2008-04-13 06:56:33 UTC
(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:
hal-0.5.11-0.5.rc2.fc9.x86_64

Comment 6 Axel Thimm 2008-04-13 07:08:00 UTC
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
output.

Comment 7 David Zeuthen 2008-04-13 20:28:39 UTC
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 20:29:13 UTC
And also the output of 'ck-list-sessions'. Thanks.

Comment 9 Axel Thimm 2008-04-14 17:04:07 UTC
$ ck-list-sessions 
Session2:
	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 17:05:08 UTC
Created attachment 302366 [details]
lshal output shortlz after plugging in the camera

Comment 11 Axel Thimm 2008-04-14 17:12:01 UTC
Created attachment 302367 [details]
ACLs of usb devices

The relevant part is probably

# file: dev/bus/usb/005/003
# owner: root
# group: root
user::rw-
user:thimm:rw-
group::rw-
mask::rw-
other::rw-

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 17:18:44 UTC
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 17:04:46 UTC
Permissions does look about right. Looks to me like a gthumb problem...

Comment 14 David Zeuthen 2008-04-15 17:06:29 UTC
Actually this is a gnome-volume-manager problem as that file comes from that
package.

Comment 15 Axel Thimm 2008-04-21 22:21:48 UTC
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.