Wrong access mode on some device files (e.g. /dev/tty)


To avoid using root all the time I’ve created a normal user for myself on my Omnia, set a password, deployed SSH keys etc. However, when I wanted to use the router as a jump server, I got the following error message (localhost is here only for example):

$ ssh -v localhost
debug1: read_passphrase: can't open /dev/tty: Permission denied
Host key verification failed.
$ ls -l /dev/tty
crw-r--r--    1 root     root        5,   0 Jul 10 09:49 /dev/tty

This should be 0666 by default. I guess the culprit is /etc/hotplug.json, which differs from the file in stock OpenWRT 18.06.0-rc1:

[ "null", "full", "ptmx", "zero", "tty", "net", "random", "urandom" ]


[ "null", "full", "ptmx", "zero" ],

Were there any explicit reasons why you changed this file? Could you please fix it in the next (minor) release?

thanks for reporting. This issue was fixed in upstream openwrt but we didn’t noticed that. I belive that there wasn’t any other reason. It’ll be fixed in next release ( commit procd: adjust /dev entries to desktop distro defaults (31cd375d) · Commits · Turris / openwrt · GitLab )


But if you are at it, you should also fix the access mode on random and urandom. Normally both are also 0666, not only on OpenWRT, but also on “big” Linux distributions (I’ve just checked it on a random node running OEL7 at $DAYJOB).

After the summer vacations etc. I’ve upgraded to 3.10.5 (kernel 4.4.150-0a333a8e606ab056173befac424900d2-1), but the access mode on /dev/tty is still wrong:

# ls -l /dev/tty
crw-r--r--    1 root     root        5,   0 Aug 30 14:40 /dev/tty


Unfortunately, it didn’t make it into Turris OS 3.10.5, but these two commits are right now included in the nightly branch, and it’s gonna be part of next release, which is Turris OS 3.10.6.

Many thanks. Please also make it sure that the other devices will get the standard access rights, not just /dev/tty.