I'm working on Linux Kernel 3.14.28 build with Buildroot for an embedded device.
In /dev/, all ttys are root:root and not root:dialout like a standard Linux. So it is not possible to access any ttyX without being logged as root.
How can I change the tty group permanently to root:dialout? I try to change it with chown command, but it became root:root again on reboot.
devtmpfsalways sets permissions to0600and makes it up toudev(or whatever runs after it) to maintain them. Its source confirms there's no way to override this explicitly (ttydevice driver overridesmodeunconditionally in some cases).Assuming you're using the Buildroot's default
busyboxasinit, there's a way to do this with the following additional line inbusybox'sinittab(additional=must be present in addition to the essential lines (or their replacements) that are implied when there's noinittab- as they are no longer implied then there is):with the script calling
chownandchmodin loop.But, it's better to handle this within the existing
/etc/init.d/rcS(which is also run by BusyBox'sinitatsysinitby default).As you can see from the stock buildroot's
/etc/init.d/rcS, all you need to do is create a script/etc/init.d/S<whatever>.sh(where "whatever" places it into the desired position in the/etc/init.d/S??*output) with your commands: