chrooted ssh user and /dev/tty permission denied
peter at vereshagin.org
Fri Jan 21 11:56:54 UTC 2011
You'll never silence the voice of the voiceless, Ibrahim!
2011/01/20 11:06:30 +0200 Ibrahim Harrani <ibrahim.harrani at gmail.com> => To freebsd-questions at freebsd.org :
IH> "cannot open /dev/tty: permission denied" message.
This sounds as a problem of standard handles permissions to me. I'm not
expereinced in C library to qualify it more exactly.
I use such a hack against this, depending on the situattion:
1. -t parameter for your ssh client
2. /usr/bin/script -qt0 /dev/null before your ssh command
or sometimes both of them.
Sometimes some of those hack leads to higher CPU consumption, so I omit the one.
IH> crw--w---- 1 root tty 0, 88 Jan 20 11:02 /dev/tty
IH> I tired to change permission as root from out of the chroot by chmod,
IH> the permission never change.
Since some version of freebsd the devices are kept in devfs and chmod may not
work ( although it did recently for me for some of a directory in /dev, or a
symlink, I just don't remember).
You should define a 'mode' rule in some of your /etc/devfs.* configs,
depending on your particular need.
73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB 12F8 0CE1 4AAC A0E2 6627)
More information about the freebsd-questions