I need to get some USB-serial devices into a particular user group to access them from an application. This is straightforward for the /dev/ttyUSB devices, where I can just use KERNEL="ttyUSB*", GROUP:="mygroup"
. However, for the symlinks like /dev/bus/usb/001/001, it is not obvious how to accomplish the same thing of setting their group to mygroup
. I can do it by editing the default rules file /etc/udev/rules.d/50-udev.rules
and adding a GROUP="mygroup"
clause to the line for usb_device which creates the symlinks in /dev/bus/usb, however editing this file is clearly suboptimal from a packaging point of view.
So: how can I write a udev rule to modify the ownership of a symlink created by an earlier, default udev rule?
(I'm working on CentOS 5.5.)