Jump to content

permanent change of permissions of the console UART


Recommended Posts

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?



Link to comment
Share on other sites

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:





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.

Link to comment
Share on other sites

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.




Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines