Koristim gphoto2 za skidanje fotografija sa USB kamere. Problem je sto to mogu raditi jedino kao root. Slijedio sam uputstva koja dodju uz gphoto2 source za instalaciju skripte u /etc/hotplug/usb koja prebaci prava na jednog odredjenog korisnika ili grupu, medjutim ne radi onako kako je opisano. Ovo je greska:
-----------8<-----------------------------------------------------------------
1.590317 gphoto2-camera(2): Initializing camera…
1.597420 gphoto2-port-usb(1): Looking for USB device (vendor 0x4a9, product 0x30
5… found.
1.608860 gphoto2-camera(2): Loading ‘/usr/lib/gphoto2/2.1.0/libgphoto2_canon.so’
…
1.627494 gphoto2-port(2): Opening USB port…
1.646662 gphoto2-port(0): Could not claim interface 0 (Operation not permitted).
Make sure no other program or kernel module (e.g. dc2xx or stv680) is using the
device and you have read/write access to the device.
1.658292 context(0): An error occurred in the io-library (‘Could not claim the U
SB device’): Could not claim interface 0 (Operation not permitted). Make sure no
other program or kernel module (e.g. dc2xx or stv680) is using the device and y
ou have read/write access to the device.
*** Error ***
An error occurred in the io-library (‘Could not claim the USB device’): Could no
t claim interface 0 (Operation not permitted). Make sure no other program or ker
nel module (e.g. dc2xx or stv680) is using the device and you have read/write ac
cess to the device.
*** Error (‘Could not claim the USB device’) ***
------------------------>8------------------------------------------
U potrazi za rjesenjem naletio sam na info da postoji USB daemon koji regulira prava, ali vise mi se svidja ovaj nacin. Ako neko ima ideju, unaprijed se zahvaljujem.
Pauli
upravo ti je razlog to sto si naveo, - korisnik nema pravo da pristupa usb hardveru.
postoji samo jedna ideja koja mi pada na pamet:
promjeni dozvole za usb xxx
negdje u /proc/bus/usb/xxx… tako da taj korisnik moze imati rw pristup.
su -
chmod 666 /proc/bus/usb/xxx
ne znam sta drugo
hanibal