Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2009 12:05:38 -0700
From:      Steve Franks <bahamasfranks@gmail.com>
To:        Roland Smith <rsmith@xs4all.nl>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: ugen device no permissions for libusb [was: Re: devd or devfs for ucom?]
Message-ID:  <539c60b90906101205g5c1281k34ed5b5c69666df4@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
>> While I wouldn't mind an answer to that question, it's actually
>> working; however, my program that uses libftdi & libusb to talk to my
>> ugen still needs to run as sudo to see the device - but if I run chmod
>> 666 /dev/* (which I'm sure is a bad idea), I don't need sudo; what
>> device is required for libusb besides ugen? =A0The hub?
>
> It will need access to /dev/usb*
>
> My solution was to create a group called 'usb', adding my user-id as a
> member, and set that as the group of /dev/usb*, with permissions 0660:
>
> ------- /etc/devfs.rules excerpt -------
> [myrules=3D10]
> add path 'uscanner*' mode 0660 group usb
> add path 'usb*' mode 0660 group usb
> add path 'ugen*' mode 0660 group usb
> ------- /etc/devfs.rules excerpt -------
>
> ------- /etc/rc.conf excerpt -------
> # Set the default devfs ruleset.
> devfs_system_ruleset=3D"myrules"
> ------- /etc/rc.conf excerpt -------

Ah!  Perfect, that was the ticket - I didn't have permissions for the
usb device, even though I had permissions for ugen.  Should've
occurred to me sooner.  Been running it under sudo for a few weeks
now...

Thanks, Roland,

Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?539c60b90906101205g5c1281k34ed5b5c69666df4>