Date: Fri, 21 Jan 2011 14:56:35 +0300 From: Peter Vereshagin <peter@vereshagin.org> To: Ibrahim Harrani <ibrahim.harrani@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: chrooted ssh user and /dev/tty permission denied Message-ID: <20110121115635.GD11931@external.screwed.box> In-Reply-To: <AANLkTi=HBmetS%2B8bHSwyXJ4h5OnYXfRYdknGZ5u6j%2BS%2B@mail.gmail.com> References: <AANLkTi=HBmetS%2B8bHSwyXJ4h5OnYXfRYdknGZ5u6j%2BS%2B@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
You'll never silence the voice of the voiceless, Ibrahim! 2011/01/20 11:06:30 +0200 Ibrahim Harrani <ibrahim.harrani@gmail.com> => To freebsd-questions@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) -- http://vereshagin.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110121115635.GD11931>