I have home made device that can be connected via USB port. When connected it gets ttyACM socket. So I have asked this question some time ago about how to set read/write permissions for device. Following the answer I have created /etc/udev/rules.d/50-ttyusb.rules
file with this content:
KERNEL=="ttyUSB[0-9]*",MODE="0666"
KERNEL=="ttyACM[0-9]*",MODE="0666"
All works fine! But if I understand correctly, now every device connected on any ttyUSB or ttyACM socket will have read/write permissions. Right?
My question is how can I automatically set read/write permissions only for this device when connected?
Relevant lsusb
output:
Bus 003 Device 005: ID ffff:0005
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTR{name}=="Logitech QuickCam Notebook Pro", SYMLINK+="video-cam1", MODE="0777"
... you don't seem to have a name but maybe you could use something likeKERNEL=="ttyUSB[0-9]*",ATTR{ID}==ffff:0005,MODE="0666"
though you may need the subsystem... This is only a guess from me because I don't fully understand this and has been a long time since I have played with it. – John Orion Jun 06 '16 at 11:05