Bug 180751 - Import photos from usb camera fails - messages in description
Import photos from usb camera fails - messages in description
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gphoto2 (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-09 22:16 EST by Darwin H. Webb
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version: 2.1.99-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-27 02:21:09 EST
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 Darwin H. Webb 2006-02-09 22:16:12 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060208 Fedora/1.5.0.1-2.1 Firefox/1.5.0.1

Description of problem:
messages from imprt window -
 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.
FC5 HTTP install and fully updated as of Feb 9th am pst.
Pent III 800 EB TYAN S1854 Trinty 400 m/b
VIA Apollo 133 chip set 1 GB PC133 Mircon memory.

USb camera Creative PC-CAM 300(connected to 4 port usb hub-  
(usbcore: registered new driver libusual
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid)
...
USB Universal Host Controller Interface driver v2.3
ACPI: PCI Interrupt 0000:00:07.2[D] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11
uhci_hcd 0000:00:07.2: UHCI Host Controller
uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:07.2: irq 11, io base 0x0000e100
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usb 1-1: new full speed USB device using uhci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
usb 1-1.1: new low speed USB device using uhci_hcd and address 3
usb 1-1.1: configuration #1 chosen from 1 choice
...
I don't know what this means or what to do.
This camera work fine with Gthumb in FC3 and FC4 and stopped in late FC4 with this problem. In fact it used to pop up the import even if Gthumb was not open and that worked fine too.

This is really need to function.

DArwin

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

How reproducible:
Always

Steps to Reproduce:
1.Gthumb menu, File, Import Photos with USB camera plugged in.
2.
3.
  

Actual Results:  error message as above.

Expected Results:  Windows with pictures from camera.

Additional info:

SELinux enabled - Targeted policy.
No exta installs only base and updates to base.
Comment 1 Radek Vokal 2006-02-10 03:41:50 EST
Which version of gphoto2 are you running. Also can you check your udev and
libusb version? I believe this if fixed in the most recent rawhide version. 
Comment 2 Darwin H. Webb 2006-02-10 11:22:19 EST
From above -
FC5 HTTP install and fully updated as of Feb 9th am pst
gThumb 2.7.2

After updates of Feb 10th 8:30 am pst
gphoto2-2.1.99-5.1
udev-084-1
libusb-0.1.11-2.1
kernel-2.6.15-1.1928_FC5

Problem still exists.

Darwin
Comment 3 Darwin H. Webb 2006-02-21 14:16:30 EST
This is still not working as of FC5T3 install from cd's. Feb 20-21.

gphoto2-2.1.99-5.2
udev-084-1.1
libusb-0.1.11-2.2
kernel-2.6.15-1.1955_FC5
hal-0.5.7-0.cvs20060213.1

Noral Desktop install - SELinux enabled - DHCP - 
Pent III 800eb x86 32 bit , tyan s1854 m/b via Apollo 133 chip set.

Last 2 messages from messages:

Feb 21 11:08:05 Host8 kernel: usb 1-1.2: new full speed USB device using
uhci_hcd and address 4
Feb 21 11:08:05 Host8 kernel: usb 1-1.2: configuration #1 chosen from 1 choice
[root@Host8 log]#

Message on pop up window:
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.


Darwin
Comment 4 Jesse Barnes 2006-02-24 21:59:22 EST
I think this is a permissions problem as I see something similar from my KDE 
desktop.  Which file controls what permissions are assigned to the device 
in /proc/bus/usb when the device is plugged in? 
 
Comment 5 Radek Vokal 2006-02-27 02:21:09 EST
I've changed the permission handling in gphoto2-2.1.99-5 so I believe this is
fixed now.
Comment 6 Darwin H. Webb 2006-02-27 12:45:27 EST
[root@testmess ~]# rpm -qa gphoto2
gphoto2-2.1.99-5.2


Well, it is still the same package as before and it is still doing it as of the
Feb 27th updates so how is it going to get fixed without a new pakage or some
usb system adjustments?

Darwin
Comment 7 Radek Vokal 2006-02-28 02:33:50 EST
The latest package sets the permissions on /dev/bus/usb/XXX. That's what I think
is the fix for this bug. 
Comment 8 Ronny Buchmann 2006-02-28 13:03:44 EST
this is a problem with selinux, so /usr/libexec/gphoto-set-procperm doesn't work

audit.log

type=AVC msg=audit(1141149795.660:155): avc:  denied  { search } for  pid=4892
comm="cat" name="console" dev=dm-7 ino=717436
scontext=system_u:system_r:hald_t:s0
tcontext=system_u:object_r:pam_var_console_t:s0 tclass=dir
type=AVC msg=audit(1141149795.660:155): avc:  denied  { read } for  pid=4892
comm="cat" name="console.lock" dev=dm-7 ino=718562
scontext=system_u:system_r:hald_t:s0
tcontext=system_u:object_r:pam_var_console_t:s0 tclass=file
type=SYSCALL msg=audit(1141149795.660:155): arch=40000003 syscall=5 success=yes
exit=3 a0=bfe6f8fa a1=8000 a2=0 a3=8000
items=1 pid=4892 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0
fsgid=0 comm="cat" exe="/bin/cat"
type=CWD msg=audit(1141149795.660:155):  cwd="/usr/libexec"
type=PATH msg=audit(1141149795.660:155): item=0
name="/var/run/console/console.lock" flags=101  inode=718562 dev=fd:07
mode=0100600 ouid=0 ogid=500 rdev=00:00
type=AVC msg=audit(1141149795.660:156): avc:  denied  { getattr } for  pid=4892
comm="cat" name="console.lock" dev=dm-7
ino=718562 scontext=system_u:system_r:hald_t:s0
tcontext=system_u:object_r:pam_var_console_t:s0 tclass=file
type=SYSCALL msg=audit(1141149795.660:156): arch=40000003 syscall=197
success=yes exit=0 a0=3 a1=bfe6e83c a2=756ff4 a3=804d7e0 items=0 pid=4892
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
comm="cat" exe="/bin/cat"
type=AVC_PATH msg=audit(1141149795.660:156):  path="/var/run/console/console.lock"
type=AVC msg=audit(1141149795.688:157): avc:  denied  { chown } for  pid=4895
comm="chown" capability=0 scontext=system_u:system_r:hald_t:s0
tcontext=system_u:system_r:hald_t:s0 tclass=capability
type=AVC msg=audit(1141149795.688:157): avc:  denied  { setattr } for  pid=4895
comm="chown" name="004" dev=tmpfs ino=16904 scontext=system_u:system_r:hald_t:s0
tcontext=system_u:object_r:usb_device_t:s0 tclass=chr_file
type=SYSCALL msg=audit(1141149795.688:157): arch=40000003 syscall=212
success=yes exit=0 a0=8444d90 a1=1f4 a2=ffffffff a3=0 items=1 pid=4895
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
comm="chown" exe="/bin/chown"
type=CWD msg=audit(1141149795.688:157):  cwd="/usr/libexec"
type=PATH msg=audit(1141149795.688:157): item=0 name="/dev/bus/usb/002/004"
flags=1  inode=16904 dev=00:10 mode=020644 ouid=0 ogid=0 rdev=bd:83
type=AVC msg=audit(1141149795.688:158): avc:  denied  { setattr } for  pid=4896
comm="chown" name="004" dev=usbfs ino=16871 scontext=system_u:system_r:hald_t:s0
tcontext=system_u:object_r:usbfs_t:s0 tclass=file
type=SYSCALL msg=audit(1141149795.688:158): arch=40000003 syscall=212
success=yes exit=0 a0=8d17d90 a1=1f4 a2=ffffffff a3=0 items=1 pid=4896
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
comm="chown" exe="/bin/chown"
type=CWD msg=audit(1141149795.688:158):  cwd="/usr/libexec"
type=PATH msg=audit(1141149795.688:158): item=0 name="/proc/bus/usb/002/004"
flags=1  inode=16871 dev=00:11 mode=0100644 ouid=0 ogid=0 rdev=00:00
Comment 9 Ronny Buchmann 2006-02-28 13:22:08 EST
this log was generated with selinux permissive
Comment 10 Jesse Barnes 2006-03-01 15:41:45 EST
This bug still isn't fixed.  This message seems to indicate that the problem 
may be with HAL though: 
http://www.redhat.com/archives/fedora-devel-list/2006-February/msg01469.html 
 
I'm running 
 
gphoto2-2.1.99-5.2 
hal-0.5.7-1 
udev-084-6 
dbus-0.60-7.2 
 
on my machine if that helps.  I'll look around to see if anyone's filed the 
HAL bug. 

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