Serial Port GID is root (not dialout) on Raspberry Pi CM4

cr flag

I am getting "Permission Denied" errors when trying to access /dev/serial0 on the Raspberry Pi CM4. I've tried the common suggestions of adding my user to the dialout and tty groups, but that has not worked. Interestingly, it seems that /dev/serial0 is not in the dialout group. When I run ls -l /dev/serial0 I get:

lrwxrwxrwx 1 root root 5 May 12 11:04 /dev/serial0 -> ttyS0

So you can see that it is part of the root group. Similarly, stat /dev/serial0 yields:

  File: /dev/serial0 -> ttyS0
  Size: 5               Blocks: 0          IO Block: 4096   symbolic link
Device: 5h/5d   Inode: 231         Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-05-12 11:04:17.809999995 -0500
Modify: 2023-05-12 11:04:11.939999998 -0500
Change: 2023-05-12 11:04:11.939999998 -0500
 Birth: -

Showing the Gid is root, not dialout.

Following the simlink to /dev/ttyS0, I can see that this is part of the tty group:

crw--w---- 1 root tty 4, 64 May 12 11:04 /dev/ttyS0

I tried accessing /dev/ttyS0 directly (instead of /dev/serial0) and I still get the Permission Denied error, even though my user is part of the tty group.

Any suggestions on how to give my user permission on this port?

guiverc avatar
cn flag
Please provide your OS/release details; is this a Ubuntu Core or Ubuntu Server install? and what release? (*they have some differences!*)
ebab72 avatar
cr flag
I'm realizing now I probably shouldn't be in AskUbuntu with Raspberry Pi OS. But I'm on Raspberry Pi OS 5.15.84-v71+.
nobody avatar
gh flag
Maybe this will help
guiverc avatar
cn flag
Please refer, Ubuntu and *official* flavors of Ubuntu ( are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes.
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.