Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.)

share|improve this question

3 Answers 3

Answered my own question: apparently it's all about using := instead of =.

SUBSYSTEM=="usb_device", MODE:="0664", GROUP:="mygroup"

This goes in a 10-usb-devices.rules file in /etc/udev/rules.d. The ":=" gets it to override the permissions of the nodes that the other rule creates -- I had initially incorrectly thought it was creating symlinks when in fact it was creating actual nodes in /dev/bus.

share|improve this answer

I was confronted to your problem 2 years ago (centos 4) and the only solution I've found was also to modify the udev rules. But I've created a specific file for it. Have you tried to create a 49-mydev.rules with your specific device ?

share|improve this answer

Symbolic link ownership shouldn't matter, only the ownership of the file that the link points to.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.