chmod USB device?

Hello everyone. I asked this question over at the FreeNAS forums but no one could answer me. I have FreeNAS 9 and am running a jail with a USB I/O device attached. I have a program that runs fine as root but not as an operator. I would like to change the permissions for the USB device in the jail or outside the jail if need be. It is attached at ugen2.2. Any help would be much appreciated.
 
devfs.conf is only read on startup, so it does not work for hot-plug devices connected later. For that, entries have to be added to the files in /etc/devd. For example, here's an entry from my /etc/devd/wb.conf:

Code:
# change permissions on foot pedal uhid device
attach 20 {
        device-name "uhid[0-9]";
        match "vendor" "0x05f3";
        match "product" "0x00ff";
        action "chmod g+w /dev/$device-name";
};
 
There is a service devfs that can be restarted, though. Doesn't that re-[read|process] devfs.conf on a running system?
 
As far as I know that does indeed load the new rules and applies them. But you'd still need the devd(8) configuration to change it automatically when it gets plugged in. Perhaps a more elegant solution would be to use service devfs restart as an action, instead of the chmod(1).
 
Back
Top