Linux udev USB Device Permissions Configuration
From MobileRobots Research and Academic Customer Support
On Linux, udev manages the creation of new device nodes in /dev when USB devices are connected (including devices such as USB-serial adapters, the Cyton arm, programmable modules such as Arduino, and other devices).
By default, new devices are only fully accessible by the root (administrator) user and by a certain group (often "dialout"). For a user to also have full access to this device, the user must be added to the group. The owner, group ownership, and permissions mode of adevice in /dev can be seen using ls -l, e.g.
ls -l /dev/ttyACM0
To add an existing user to a group groupname, use the following command as root, substituting the new group for groupname and the user name for username.
usermod username -a -G groupname
Don't forget the -a option, it aadds the new group to the user's list rather than replacing it.
You can also configure udev's rules to set different permissions and ownership and perform many other actions for new devices by creating and editing files in /etc/udev/rules.d. See the existing rules and udev documentation for syntax.
For example, we include a rule for a certain device (a USB-serial device) that identifies itself (through USB device protocol) with the vendor ID 0403 and product ID 6001 to use the group "users" and the permissions mode 0666 via this rule in /etc/udev/rules.e/40-persistent-ftdi.rules:
ATTRS{idVendor}="0403",ATTRS{idProduct}=="6001",MODE="0666",GROUP="users"
Device vendor and product identifiers etc. can usually be seen in the kernel log messages viewable with the dmesg command.
