Change ttyUSB permissions using udev

不打扰是莪最后的温柔 提交于 2019-12-02 12:28:11

问题


My program needs to access ttyUSB without root permission.

I tried changing it with chmod 777 /dev/ttyUSB0 as you know, when I reboot this permission changed to default. How can I configure my udev rules.d for this?


回答1:


Look for ttyUSB* in the rules.d directory and update it to look lke below:

KERNEL=="ttyUSB*", MODE="0777"

Leave any other entries you find on the line unchanged, add the mode attribute if it does not exist.



来源:https://stackoverflow.com/questions/14291431/change-ttyusb-permissions-using-udev

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!