From owner-freebsd-questions@FreeBSD.ORG Fri Jan 21 11:56:53 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6C2C1065673 for ; Fri, 21 Jan 2011 11:56:53 +0000 (UTC) (envelope-from peter@vereshagin.org) Received: from mx1.skyriver.ru (ns1.skyriver.ru [89.108.118.221]) by mx1.freebsd.org (Postfix) with ESMTP id A2DA38FC1E for ; Fri, 21 Jan 2011 11:56:53 +0000 (UTC) Received: from localhost (unknown [199.48.147.40]) by mx1.skyriver.ru (Postfix) with ESMTPSA id BB2525A95; Fri, 21 Jan 2011 14:39:06 +0300 (MSK) Date: Fri, 21 Jan 2011 14:56:35 +0300 From: Peter Vereshagin To: Ibrahim Harrani Message-ID: <20110121115635.GD11931@external.screwed.box> References: MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: Organization: ' X-Face: 8T>{1owI$Byj]]a; ^G]kRf*dkq>E-3':F>4ODP[#X4s"dr?^b&2G@'3lukno]A1wvJ_L(~u 6>I2ra/<,j1%@C[LN=>p#_}RIV+#:KTszp-X$bQOj,K Cc: freebsd-questions@freebsd.org Subject: Re: chrooted ssh user and /dev/tty permission denied X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2011 11:56:54 -0000 You'll never silence the voice of the voiceless, Ibrahim! 2011/01/20 11:06:30 +0200 Ibrahim Harrani => 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