xuraax Posted June 29, 2022 Share Posted June 29, 2022 I would like to permanently change at start up the UART permissions of /dev/ttyAML0 to give user, read write permissions always. I can do this with the usual "chmod" command but this gets reset after every boot and sometimes also during normal operations. Can somebody direct me to how this can be done please? xuraax 0 Quote Link to comment Share on other sites More sharing options...
tparys Posted June 30, 2022 Share Posted June 30, 2022 Serial port devices starting with tty are often times are owned by root, but group dialout. If that's the case, the easiest is to add your user to the dialout group. Should be something along the lines of (but check "man usermod" before running it): $ sudo usermod -aG dialout <USERNAME> If the device is user and group root, you'll need to write a udev rule to set permissions when the kernel registers the device. Some brief reading material: https://stackoverflow.com/questions/14291431/change-ttyusb-permissions-using-udev#14292077 https://www.linuxquestions.org/questions/slackware-14/udev-rules-and-ttys0-device-644237/ Short version is that there's a few udev/rules.d directories, and you'll need to make a new rule file to match your KERNEL ttyAML0 device, and either assign ownership to your user, change group to dialout, or just make it world writable. 0 Quote Link to comment Share on other sites More sharing options...
xuraax Posted June 30, 2022 Author Share Posted June 30, 2022 Thanks for your reply. I did add my user name to dialout but I still was refused permission to access from Python. After booting the user has write permission but not read. I will study the links provided. I hope it is not too complicated for me. I am not a complete novice but certainly no expert. Regards 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.