I want to change the group of /dev/ttyAMA0 from tty to dialout permanently, but couldn't find any entry in udev rules.
Where is the group of /dev/ttyAMA0 defined by udev ? Or any other system...
Code: Select all
pi@raspberrypi ~ $ ls -la /dev/ttyAMA0
crw-rw---- 1 root tty 204, 64 Ara 28 12:59 /dev/ttyAMA0
Code: Select all
sudo chgrp dialout /dev/ttyAMA0Code: Select all
pi@raspberrypi ~ $ ls -l /dev/ttyUSB0
crw-rw---T 1 root dialout 188, 0 Dec 29 05:00 /dev/ttyUSB0
Ok, that was misleading. udev sets the device to root:dialout, but getty sets it to root:tty immediately, and login changes it to pi:tty. (There may be some race condition or trigger that can make udev chgrp the device after getty, because I still have some pies where getty is running and the group is dialout.)jojopi wrote:The device should be root:dialout unless/until you log in on that terminal, when it is correctly changed to pi:tty.
Code: Select all
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100Thanks! That was the solution. Sorry for my belated message.jojopi wrote:Ok, that was misleading. udev sets the device to root:dialout, but getty sets it to root:tty immediately, and login changes it to pi:tty. (There may be some race condition or trigger that can make udev chgrp the device after getty, because I still have some pies where getty is running and the group is dialout.)jojopi wrote:The device should be root:dialout unless/until you log in on that terminal, when it is correctly changed to pi:tty.
Still if you disable getty, which you need to do anyway for most outbound uses of the port, the permissions should stay as you want. Remove or comment out this line from /etc/inittab:Code: Select all
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100