From owner-freebsd-current@FreeBSD.ORG Mon Oct 20 03:10:20 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C362516A4B3 for ; Mon, 20 Oct 2003 03:10:20 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77A7743FAF for ; Mon, 20 Oct 2003 03:10:16 -0700 (PDT) (envelope-from andreas@klemm.apsfilter.org) Received: from srv1.cosmo-project.de (localhost [IPv6:::1]) h9KAAEt2029560 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 20 Oct 2003 12:10:14 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: (from uucp@localhost)h9KAAD1s029557 for freebsd-current@freebsd.org; Mon, 20 Oct 2003 12:10:13 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: from titan.klemm.apsfilter.org (localhost.klemm.apsfilter.org [127.0.0.1]) by klemm.apsfilter.org (8.12.10/8.12.9) with ESMTP id h9KA5lpc002309 for ; Mon, 20 Oct 2003 12:05:52 +0200 (CEST) (envelope-from andreas@titan.klemm.apsfilter.org) Received: (from andreas@localhost)h9KA5lq6002308 for freebsd-current@freebsd.org; Mon, 20 Oct 2003 12:05:47 +0200 (CEST) (envelope-from andreas) Date: Mon, 20 Oct 2003 12:05:47 +0200 From: Andreas Klemm To: freebsd-current@freebsd.org Message-ID: <20031020100547.GA1615@titan.klemm.apsfilter.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 5.1-CURRENT X-Disclaimer: A free society is one where it is safe to be unpopular User-Agent: Mutt/1.5.4i Subject: USB problem: /dev/ugen* dynamically auto-reconfigures to root:operator 644, so non-root user unable to access USB devices even if wanted X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2003 10:10:20 -0000 Hi, have severe problems accessing usb devices as non-root user. In this case a Canon Powershot G5 camera. I want to download pics from my digicam using digikam application as user "andreas". The devices that are being used by digikam: root@titan[ttyp2]{57} ~ lsof | grep digikam | grep /dev digikam 1755 root 0u VCHR 5,2 0t19646 110 /dev/ttyp2 digikam 1755 root 1u VCHR 5,2 0t19646 110 /dev/ttyp2 digikam 1755 root 2u VCHR 5,2 0t19646 110 /dev/ttyp2 digikam 1755 root 15u VCHR 114,16 0t0 128 /dev/ugen1 digikam 1755 root 16r VCHR 114,17 0t7817 131 /dev/ugen1.1 digikam 1755 root 17r VCHR 114,19 0t16 133 /dev/ugen1.3 Running digikam with SUID root bit turned on doesn't work. andreas@titan[ttyp4]{1032} ~ digikam The KDE libraries are not designed to run with suid privileges. Changing the permissions on /dev/ugen1* doesn't work either since - even _if_ the devices are present after turning camera on and - even _if_ permissions of /dev/ugen1 /dev/ugen1.1 ... 1.3 are being changed successfully to 666 the devices seems to be on the 1st access dynamically recreated, since the permissions suddenly are *re-set* to root 644 automagically after the 1st access of the digikam application as user. To sum up: as normal user I'm unable to connect to the USB camera. Is there a more generic approach to be able to use USB devices as non-root user, that I overlooked up to now ? Andreas /// -- Andreas Klemm - Powered by FreeBSD 5.1-CURRENT Need a magic printfilter today ? -> http://www.apsfilter.org/