Using a scanner (USB) as user and not as root

Marco Beishuizen mbeis at xs4all.nl
Thu Apr 29 20:13:43 UTC 2010


On Wed, 28 Apr 2010, Warren Block wrote:

> You can use devd.conf for this:
>
> attach 100 {
>        device-name "ugen[0-9].[0-9]";
>        match "vendor" "0x04b8";
>        match "product" "0x010a";
>        action "usb_devaddr=`echo $device-name | sed 's#^ugen##'` && \
>                chown root:saned /dev/usb/${usb_devaddr}.* && \
>                chmod 0660 /dev/usb/${usb_devaddr}.*
>
> Copied from a post on -current or similar; apologies to the author, who I've 
> forgotten.  I thought this was in the default devd.conf as an example, but it 
> appears not.
>
> devfs.rules don't apply to devices that are created dynamically after 
> boot-up.  Or I guess they might be if you reload the ruleset with applyset 
> after the device is created, but devd is a lot more capable.

Unfortunately this didn't help either (I replaced the vendor and product 
with the correct digits for my scanner, and the chown with the user name). 
The usb devices are still owned by root and not accessible as user.

Marco
-- 
You have the capacity to learn from mistakes.
You'll learn a lot today.


More information about the freebsd-questions mailing list