<p dir="ltr"></p>
<p dir="ltr">On Mar 27, 2014 8:48 AM, "Satz Klauer" <<a href="mailto:satzklauer@googlemail.com">satzklauer@googlemail.com</a>> wrote:<br>
><br>
> So...hopefully this is really the udev mailing list...<br>
><br>
> I use CentoOS 6.5, an embedded device that is connected via USB and<br>
> shows up as /dev/ttyACMx (in my case it is always /dev/ttyACM0). To<br>
> have it read/writable for everybody and to avoid the modem-manager is<br>
> accessing it I created following rule in<br>
> /etc/udev/rules.d/52-mydev.rules:<br>
><br>
> SUBSYSTEM=="usb", ATTR{idVendor}=="1781", ATTR{idProduct}=="1ef0",<br>
> MODE="0666", GROUP="plugdev", ENV{ID_MM_DEVICE_IGNORE}="1"<br>
><br>
> Unfortunately they are not working as expected, /dev/ttyACM0 is still<br>
> not world-read/writable and the modem-manager still comes in between.<br>
><br>
> What I found meanwhile using udev-debug-output: the rule is used and<br>
> applied, at least for the mode 0666. But udev sets the permissions to<br>
> the USB endpoint path (something with /bus/usb/...) but not to the<br>
> device.<br>
><br>
> So: how can I let udev change the permission of the device? And whyt<br>
> could be the reason why modem-manager still tries to use it?<br>
><br>
> Any ideas and suggestions are welcome!</p>
<p dir="ltr">udev sets permissions on the USB endpoint because that's what your rule matches – you have SUBSYSTEM="usb", you match against USB sysfs attributes, etc.</p>
<p dir="ltr">The actual tty device node most likely has "tty" as subsystem – use `udevadm info /dev/ttyACM0` to see the subsystem and the ENV{} variables that you can match against, and let the rule check also attrs of _parent_ devices using ATTRS{} instead of ATTR{} (if these matches are necessary in the end; I think env matches will be simpler).</p>

<p dir="ltr">-- <br>
Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>></p>