Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change ttyUSB permissions using udev

Tags:

ubuntu

tty

udev

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?

like image 742
Amir.s Avatar asked Oct 22 '25 21:10

Amir.s


1 Answers

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.

like image 162
user1055604 Avatar answered Oct 25 '25 12:10

user1055604



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!