How to change tty group on Linux (build with buildroot) -


i'm working on linux kernel 3.14.28 build buildroot embedded device.

in /dev/, ttys root:root , not root:dialout standard linux. not possible access ttyx without being logged root.

how can change tty group permanently root:dialout? try change chown command, became root:root again on reboot.

devtmpfs sets permissions 0600 , makes udev (or whatever runs after it) maintain them. its source confirms there's no way override explicitly (tty device driver overrides mode unconditionally in cases).

assuming you're using buildroot's default busybox init, there's way following additional line in busybox's inittab (additional=must present in addition essential lines (or replacements) implied when there's no inittab - no longer implied there is):

::sysinit:<path_to_your_script> 

with script calling chown , chmod in loop.

but, it's better handle within existing /etc/init.d/rcs (which run busybox's init @ sysinit default).

as can see stock buildroot's /etc/init.d/rcs, need create script /etc/init.d/s<whatever>.sh (where "whatever" places desired position in /etc/init.d/s??* output) commands:

for tty in /dev/tty*;     chown root:dialout "$tty"     chmod ug+rw "$tty"   #do not touch other bits done unset tty 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -