Bug 179315

Summary: non root users unable to detect digicamera with gphoto2
Product: [Fedora] Fedora Reporter: Gianluca Cecchi <gianluca.cecchi>
Component: halAssignee: John (J5) Palmieri <johnp>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: jkeck
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: gphoto2-2.1.99-5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-01 11:09:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gianluca Cecchi 2006-01-30 09:04:05 UTC
Description of problem:
After removal of hotplug package, it seems that non root users unable to detect
and use digicamera with gphoto2. Should this be managed by udev now?

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


How reproducible:
always

Steps to Reproduce:
1. connect and power on digicamera
2. gphoto2 --auto-detect as non root user detects nothing
3. gphoto2 --auto-detect as root user detects digicamera
  
Actual results:
Only root can see digicamera

Expected results:
All users able to use digicamera

Additional info:
Applied latest updates as of 28/01/06
- MAKEDEV-3.21-1
- udev-078-8 (changelog of 27/01 gives: changed usb device naming
could it be of influence for the problem?)
- gphoto2-2.1.99-4

In 21/01 rawhide report we have:
Removed package hotplug
And the update removed it on my system, so that now I have not it.

From non root user:
[valeria fedora ~]$ gphoto2 --auto-detect 
Modello                        Porta
----------------------------------------------------------

From root:
[root fedora ~]# gphoto2 --auto-detect
Model                          Port
----------------------------------------------------------
Kodak CX7525                   usb:
Kodak CX7525                   usb:002,002

gphoto2 --version gives:
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

Should I have to re-install hotplug or what?
What program/daemon would have to care about correct handling
permission of usb devices for non root users?

Comment 1 Bill Nottingham 2006-01-31 16:38:15 UTC
You need gphoto2-2.1.99-5.

Comment 2 Gianluca Cecchi 2006-01-31 19:33:44 UTC
no way also with gphoto2-2.1.99-5
before upgrade:
- plug digicamera
 In dmesg
usb 2-2: new full speed USB device using ohci_hcd and address 2
usb 2-2: configuration #1 chosen from 1 choice
[gcecchi fedora fedora]$ ll /proc/bus/usb/002/
total 0
-rw-r--r-- 1 root    root 43 Jan 31 18:44 001
-rw-r--r-- 1 gcecchi root 57 Jan 31 20:12 002
[gcecchi fedora fedora]$ ll /dev/bus/usb/002/
total 0
crw------- 1 root root 189, 128 Jan 31 18:44 001
crw------- 1 root root 189, 129 Jan 31 20:12 002

- unplug digicamera
 in dmesg
usb 2-2: USB disconnect, address 2
[gcecchi fedora fedora]$ ll /dev/bus/usb/002/
total 0
crw------- 1 root root 189, 128 Jan 31 18:44 001
[gcecchi fedora fedora]$ ll /proc/bus/usb/002/
total 0
-rw-r--r-- 1 root root 43 Jan 31 18:44 001

- upgrade gphoto2
[root fedora RPMS]# rpm -Uvh gphoto2-2.1.99-5.i386.rpm
Preparing...                ########################################### [100%]
   1:gphoto2                ########################################### [100%]

- replug digicamera

usb 2-2: new full speed USB device using ohci_hcd and address 3
usb 2-2: configuration #1 chosen from 1 choice
[gcecchi fedora fedora]$ ll /dev/bus/usb/002/
total 0
crw------- 1 root root 189, 128 Jan 31 18:44 001
crw------- 1 root root 189, 130 Jan 31 20:19 003
[gcecchi fedora fedora]$ ll /proc/bus/usb/002
total 0
-rw-r--r-- 1 root    root 43 Jan 31 18:44 001
-rw-r--r-- 1 gcecchi root 57 Jan 31 20:19 003
[gcecchi fedora fedora]$ gphoto2 --auto-detect
Model                          Port
----------------------------------------------------------

>From changelog of gphoto2:
* Mon Jan 30 2006 Bill Nottingham <notting redhat com> 2.1.99-5
- set permissions on /dev/bus/usb/XXX as well - that's what new
  libusb uses by default

It seems that hal/udev set permissions for gcecchi into the wrong directory....
I'm not sure if the current udev rule is this line inside
/etc/udev/rules.d/50-udev.rules

ACTION=="add", SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k;
K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'",
NAME="%c"

Comment 3 John (J5) Palmieri 2006-01-31 19:58:41 UTC
did you restart HAL after the update?  HAL needs to pick up the new fdi files
for the policy to start working.  Restart HAL and then log out and log back into
your user account and try again (or simply reboot).

Comment 4 Gianluca Cecchi 2006-02-01 11:08:36 UTC
simply restarting haldaemon service didn't work.

- init 3
- yum update of other latest (31/01/06) packages
- init 5
- re-login in gnome as gcecchi
- plug digicamera
- all ok now

I'll close this bug