Bug 179315 - non root users unable to detect digicamera with gphoto2
non root users unable to detect digicamera with gphoto2
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-30 04:04 EST by Gianluca Cecchi
Modified: 2013-03-13 00:49 EDT (History)
1 user (show)

See Also:
Fixed In Version: gphoto2-2.1.99-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-01 06:09:55 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 Gianluca Cecchi 2006-01-30 04:04:05 EST
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 11:38:15 EST
You need gphoto2-2.1.99-5.
Comment 2 Gianluca Cecchi 2006-01-31 14:33:44 EST
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 14:58:41 EST
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 06:08:36 EST
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

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