From owner-freebsd-usb@FreeBSD.ORG Thu Jul 7 19:22:59 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D81E116A41C for ; Thu, 7 Jul 2005 19:22:59 +0000 (GMT) (envelope-from chu@h33.erkki.ton.tut.fi) Received: from h33.erkki.ton.tut.fi (h33.erkki.ton.tut.fi [193.166.84.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id 774AD43D48 for ; Thu, 7 Jul 2005 19:22:59 +0000 (GMT) (envelope-from chu@h33.erkki.ton.tut.fi) Received: from [10.10.1.4] (helo=localhost) by h33.erkki.ton.tut.fi with esmtp (Exim 4.50 (FreeBSD)) id 1Dqbuw-000Jk2-Tm for freebsd-usb@freebsd.org; Thu, 07 Jul 2005 22:20:15 +0300 Cc: freebsd-usb@freebsd.org References: <20050704064811.GA2784@jet.franken.de> Message-ID: Date: Thu, 07 Jul 2005 22:22:54 +0300 From: "Vladimir Chukharev" Organization: @home Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Opera M2/8.01 (FreeBSD, build 1204) Subject: Re: [gphoto-devel] Re: usb degradation with FreeBSD 4 -> 5 upgrade X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2005 19:23:00 -0000 On Mon, 04 Jul 2005 23:26:47 +0300, Vladimir Chukharev wrote: > On Mon, 04 Jul 2005 09:48:11 +0300, Marcus Meissner wrote: > >> On Sat, Jul 02, 2005 at 08:19:01PM +0300, Vladimir Chukharev wrote: >> ... >> It cannot even send a single message, so either your libusb, or other >> lowlevel components are broken. >> >> Try >> export USB_DEBUG=255 >> gphoto2 --debug --summary >> >> and check the libusb debug output. > > OK, thanks a lot! It practically immediately shed light to the fact > that I have no permission to use the usb devices. After a small fight > I could use gphoto2 (and then gtkam) as root. I think I will manage > to put more permissions for normal users later. > > Thanks again! Well, now I can use gtkam as root to get photos out of my camera. But still not as ordinary user. By default the created on camera connection devices /dev/ugen0{,.1,.2,.3} are owned by root:operator and have pervissions crw-r--r--. It was easy to hack /etc/usbd.conf to change the permissions to crw-rw-rw-, but it is not enough. Somewhere in the middle of communication with the camera the device permissions of ugen0.* are reset back to 644 and the program fails. Results from 'ls -Fail /dev/u*' before and after gtkam run follow. chu@chu:~ 22:09:38 $ ll /dev/u* 106 crw-rw-rw- 1 root operator 226, 0 Jul 7 18:26 /dev/ugen0 107 crw-rw-rw- 1 root operator 225, 1 Jul 7 18:26 /dev/ugen0.1 108 crw-rw-rw- 1 root operator 225, 2 Jul 7 18:26 /dev/ugen0.2 109 crw-rw-rw- 1 root operator 225, 3 Jul 7 18:26 /dev/ugen0.3 99 crw-r--r-- 1 root operator 227, 0 Jul 7 18:26 /dev/ums0 33554436 lrwxr-xr-x 1 root wheel 6 Jul 7 21:26 /dev/urandom@ -> random 30 crw-rw---- 1 root operator 241, 255 Jul 7 18:26 /dev/usb 29 crw-rw---- 1 root operator 241, 0 Jul 7 18:26 /dev/usb0 31 crw-rw---- 1 root operator 241, 1 Jul 7 18:26 /dev/usb1 32 crw-rw---- 1 root operator 241, 2 Jul 7 18:26 /dev/usb2 33 crw-rw---- 1 root operator 241, 3 Jul 7 18:26 /dev/usb3 chu@chu:~ 22:15:37 $ ll /dev/u* 106 crw-rw-rw- 1 root operator 226, 0 Jul 7 18:26 /dev/ugen0 110 crw-r--r-- 1 root operator 225, 1 Jul 7 18:26 /dev/ugen0.1 111 crw-r--r-- 1 root operator 225, 2 Jul 7 18:26 /dev/ugen0.2 112 crw-r--r-- 1 root operator 225, 3 Jul 7 18:26 /dev/ugen0.3 99 crw-r--r-- 1 root operator 227, 0 Jul 7 18:26 /dev/ums0 33554436 lrwxr-xr-x 1 root wheel 6 Jul 7 21:26 /dev/urandom@ -> random 30 crw-rw---- 1 root operator 241, 255 Jul 7 18:26 /dev/usb 29 crw-rw---- 1 root operator 241, 0 Jul 7 18:26 /dev/usb0 31 crw-rw---- 1 root operator 241, 1 Jul 7 18:26 /dev/usb1 32 crw-rw---- 1 root operator 241, 2 Jul 7 18:26 /dev/usb2 33 crw-rw---- 1 root operator 241, 3 Jul 7 18:26 /dev/usb3 Can somebody help me to find the reason for this please? -- V.Chukharev