Bug 186131 - gthumb does not work as normal user
gthumb does not work as normal user
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gthumb (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Behdad Esfahbod
:
: 188383 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-21 14:58 EST by jarki
Modified: 2014-01-21 17:53 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-11 10:32:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jarki 2006-03-21 14:58:49 EST
Description of problem:

Can't download images with gthumb or gphoto2 if you are logged as non-root user.
Works nice as root user.
Download with the same camera worked with FC3 and FC4. 

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

Gnome gthumb 2.7.3

This version of gphoto2 is using the following software versions and options:
gphoto2           2.1.99       i386-redhat-linux-gcc, popt, exif, no cdk, no aa,
jpeg, readline
libgphoto2        2.1.99       i386-redhat-linux-gcc, EXIF, no /proc/meminfo
libgphoto2_port   0.5.2        i386-redhat-linux-gcc, USB, serial baudboy locking

Canon PowerShot S45


How reproducible:
Constantly.

Steps to Reproduce:
1. Install fresh FC5 final.
2. Plug camera to USB port. 
3. Try load images with gthumb or gphoto2.
  
Actual results:

Errors like

An error occurred in the io-library ('Could not claim the USB device'): Could
not claim interface 0 (Toiminto ei ole sallittu). 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:

Download should work.


Additional info:
Comment 1 Dawid Zamirski 2006-03-21 18:54:27 EST
Same here on x86_64 using FC5 final with Canon EOS 300D camera
Comment 2 Bruce Brackbill 2006-03-28 20:36:04 EST
I also see this error: FC5 final ( Kodak EasyShare cx7220 ). gphoto2 2.1.99-8
This worked on FC4.

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.

Here is related bug:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=183972
Comment 3 Bruce Brackbill 2006-04-03 23:24:18 EDT
looks like a selinux problem.

Here is the dmesg output after plugging in the camera:

usb 3-1: new full speed USB device using uhci_hcd and address 4
usb 3-1: configuration #1 chosen from 1 choice
audit(1144121337.284:16): avc:  denied  { search } for  pid=3232 comm="cat"
name="console" dev=dm-0 ino=589913 scontext=system_u:system_r:hald_t:s0
tcontext=system_u:object_r:pam_var_console_t:s0 tclass=dir

Comment 4 jarki 2006-04-04 09:32:23 EDT
I think I tested without SELinux (disabled), but it didnt' help.
Comment 5 Bruce Brackbill 2006-04-04 12:48:23 EDT
I tested with selinux disabled and it worked. No errors and import of images
successful.

jarki, maybe you can disable selinux again, or check for "denied" messages in
dmesg when you plug the camera in.
Comment 6 jarki 2006-04-04 13:10:07 EDT
Tested once again - SElinux was disabled.
No changes, the same 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.

dmesg does not show any errors 

usb 2-1: new full speed USB device using uhci_hcd and address 3
usb 2-1: configuration #1 chosen from 1 choice

These same dmesg messages can be seen when SElinux enabled.




Comment 7 Dawid Zamirski 2006-04-04 13:56:34 EDT
Also in my case SELinux is disabled (I always disable it during install as I
don't need it for desktop) and the problems exists. Same dmesg message as jarki has.
Comment 8 jarki 2006-05-06 06:31:06 EDT
Installed another vanilla FC5 on another PC and the problem reproduces with
latest   
FC5 updates applied.
Comment 9 Seth Vidal 2006-05-08 09:56:21 EDT
Ditto here. Selinux disabled - same behavior - more or less the same in fspot, too.
Comment 10 jarki 2006-05-28 05:14:43 EDT
Found a easy fix from here 
http://www.redhat.com/archives/rhl-list/2006-May/msg02620.html
Works for my Canon PowerShot S45. 
Comment 11 Dawid Zamirski 2006-05-30 22:11:38 EDT
The fix that jarki provided doesn't work for me (Canon EOS 300D) and I reverted
back to original settings in the .fdi file. However when I changed communication
mode from "normal" to "ptp" in my camera the issue is gone and I can import the
photos using regular user account.
Comment 12 Jeff Peterson 2006-05-30 23:04:08 EDT
In the /usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
file, I changed the entry for my camera model DC3400. I changed the
"camera.access_method" entry from 'proprietary' to 'ptp' as shown below:

<merge key="camera.access_method" type="string">ptp</merge>

Then, as a normal user, I turn on my camera for download and gthumb-import
starts up and states "no images". However, I press the camera button icon in the
gthumb-import window and it downloads the images ok.

At least I can now download the images without using root.
Comment 13 Neil Drinkwater 2006-06-21 07:06:21 EDT
I also have this prob. After a bit of looking around...I have found that if as
su chown the /dev/bus/usb/ and /proc/bus/usb/ to my username, gthumb works.
So... I created a test script cutting from /usr/libexec/gphoto-set-procperm the
line "bus_num=`printf %.3u $HAL_PROP_USB_BUS_NUMBER`" and echoing $bus_num....
the output is "000". Could this be the source of the problem, the permissions on
the devices don't get chowned!
Comment 14 Matthias Clasen 2006-08-02 23:40:29 EDT
Reassigning to John, who has done the most of the hotplug work.

John, we need to make sure that this works reasonably for FC6
Comment 15 Matthias Clasen 2006-08-02 23:48:01 EDT
*** Bug 188383 has been marked as a duplicate of this bug. ***
Comment 16 John (J5) Palmieri 2006-08-03 15:30:00 EDT
what version of HAL are you using?  Is this fixed with the latest HAL release in
FC-5?
Comment 17 jarki 2006-08-05 01:24:49 EDT
I am using hal-0.5.7.1-2.fc5 and kernel 2.6.17-1.2157_FC5 (currently the latest
versions) and the problem still reproduces.
Comment 18 Hans de Goede 2006-08-12 01:00:47 EDT
(In reply to comment #17)
> I am using hal-0.5.7.1-2.fc5 and kernel 2.6.17-1.2157_FC5 (currently the latest
> versions) and the problem still reproduces.

Strange I had the same problem with my kodak ptp camera and it was fixed by the
latest hal, now I'm only experiencing bug 201359, iow gthumb-import doesn't get
started automaticly when I plugin the camera, but when I do it manually it works
fine as a normal user.

(In reply to comment #11)
>  However when I changed communication
> mode from "normal" to "ptp" in my camera the issue is gone and I can import the
> photos using regular user account.

Ah, maybe in normal mode its a usb storage device and you can access the photos
through the file manager?
Comment 19 Seth Vidal 2006-08-12 08:53:05 EDT
This stopped happening for me a while ago. Sorry I didn't report it at the time.
I had forgotten about the bug.
Comment 20 Hans de Goede 2006-08-12 18:14:41 EDT
(In reply to comment #19)
> This stopped happening for me a while ago. Sorry I didn't report it at the time.
> I had forgotten about the bug.

Same for me, jarki can you test with a fully up2date FC-5 system?

Comment 21 jarki 2006-08-13 03:49:19 EDT
Tested with two different native FC5 installations (no update from previous
releases) with latest HAL and the problem still exists. In
10-camera-libgphoto2.fdi I had 
<merge key="camera.access_method" type="string">proprietary</merge>
which should be the original line.
Does this work for you with Canon (or Canon S45)?
Comment 22 Hans de Goede 2006-08-13 03:59:18 EDT
(In reply to comment #21)
> Tested with two different native FC5 installations (no update from previous
> releases) with latest HAL and the problem still exists. In
> 10-camera-libgphoto2.fdi I had 
> <merge key="camera.access_method" type="string">proprietary</merge>
> which should be the original line.
> Does this work for you with Canon (or Canon S45)?

Please first run yum-update or puplet and let it fully update your system 2 of
us were seeing similar problems and no longer have this problem. Maybe it was in
udev or ...? Who knows? Thus please try with a fully updated system. Thanks!
Comment 23 jarki 2006-08-13 11:00:22 EDT
Yes I run FC5 with the latest updates as you can see from my previous updates above.
Does this work for you with Canon (or Canon S45) with new FC5 installation, so
that you have not upgraded Fedora from previous releases (FC4)?
Comment 24 Hans de Goede 2006-08-13 17:07:11 EDT
(In reply to comment #23)
> Yes I run FC5 with the latest updates as you can see from my previous updates
above.
> Does this work for you with Canon (or Canon S45) with new FC5 installation, so
> that you have not upgraded Fedora from previous releases (FC4)?

No I have another type of camera I just wanted to make sure this problem still
exists for you.
Comment 25 Dawid Zamirski 2006-08-13 17:43:09 EDT
> Ah, maybe in normal mode its a usb storage device and you can access the photos
> through the file manager?

Nope, when I'm in 'normal' mode nothing seems to appear in /media. In FC4 it was
working ok in nomral mode but it wans't in PTP, AFAIK. In FC5 it works in PTP
but not in normal. Hopefully one of these modes will continue work in FC6 ;-)
Comment 26 Gerard Fernandes 2006-08-14 17:22:18 EDT
Tested with current updated FC5 (updated as of 13th Aug 2006) and works fine
with Canon PowerShot A700. Although it doesn't detect the camera by name, it
correctly detects that a digital camera is connected and accesses it as a PTP
camera and downloads images when logged in as a normal (non-root) user.
Comment 27 Matthias Clasen 2006-09-06 13:17:28 EDT
This is an FC5 bug, so moving of FC6Desktop. Actually, this should probably be
closed now, John ?
Comment 28 jarki 2006-09-07 04:29:11 EDT
Matthias, the problem is not solved yet.
Why you are saying this should be closed?
Thanks.
Comment 29 jarki 2006-10-30 09:27:48 EST
Upgraded two laptops, which previously has this problem, from FC5 to FC6 and 
tested this with the same PowerShot S45.
This seems to work now without problems.
Thanks.
Comment 30 Mark Eackloff 2008-01-13 00:45:06 EST
Problem still exists in Fedora 8, gthumb 2.10.7-1.fc8 with my PowerShot A560 on
both my 32bit desktop and my AMD 64x2 laptop.
Comment 31 Mark Eackloff 2008-01-13 15:56:35 EST
Another observation.  This error may be intermittent.  Yesterday the upload was
not working.  Today, first thing after logging in, it works.  Then, closed
gthumb and turned the camera off.  Then turned the camera back on. gthumb came
up reporting a camera was detected and there were photos to import.  So I
clicked the import button and got the whole "Could not claim the USB device"
error that I was getting yesterday.
Comment 32 Mark Eackloff 2008-02-12 14:03:01 EST
Problem has gone away for me.  I can now upload every time as a normal user. 
Have received a few fedora updates since my last post (#31) including updates to
the kernel.
Comment 33 petrosyan 2008-03-10 21:58:30 EDT
Fedora Core 5 is no longer maintained. Is this bug still present in Fedora 7 or
Fedora 8?
Comment 34 jarki 2008-03-11 10:09:53 EDT
As a filer I can say that the bug does not reproduce anymore in Fedora 8 with
the latest updates.
Thanks.

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