From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 263C0138CBF for ; Tue, 17 Mar 2015 20:14:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BB9AE0AB3; Tue, 17 Mar 2015 20:14:34 +0000 (UTC) Received: from lyseo.edu.ouka.fi (unknown [82.128.138.2]) by pigeon.gentoo.org (Postfix) with ESMTP id 009EAE09EE for ; Tue, 17 Mar 2015 20:14:32 +0000 (UTC) Received: from [100.100.53.61] (85-76-144-216-nat.elisa-mobile.fi [85.76.144.216]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by lyseo.edu.ouka.fi (Postfix) with ESMTPSA id BFD0513FCE9D for ; Tue, 17 Mar 2015 22:14:18 +0200 (EET) Subject: Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update] References: <20150313115241.60fee51b1e2d361dcdd99f7c@gmail.com> <125a8276-2199-4dae-8dc9-619ca436e548@email.android.com> <20150313151628.cc840cdef745f8947c944afd@gmail.com> <20150313222829.2423b7f6@digimed.co.uk> <20150314000034.10ed9854@hal9000.localdomain> <20150314011632.53fda22f@hal9000.localdomain> <20150314060834.3492e89c7ac2e449c93a2319@gmail.com> <20150314103359.735324c1@digimed.co.uk> <20150314064742.eb3fd479e7e54df67d2af665@gmail.com> <20150317121108.711bfd50fe3a8a11383a3812@gmail.com> <20150317133323.a1145ab469b3eb8eada1fbf6@gmail.com> <3D97C856-A376-454C-9361-F624230CCE1B@iki.fi> <20150317155214.2d7a4fba289dd07a125e6bd0@gmail.com> From: Matti Nykyri Content-Type: text/plain; charset=us-ascii X-Mailer: iPhone Mail (11D201) In-Reply-To: <20150317155214.2d7a4fba289dd07a125e6bd0@gmail.com> Message-Id: <462A6275-708E-4A79-B148-01A257B9F476@iki.fi> Date: Tue, 17 Mar 2015 22:14:03 +0200 To: "gentoo-user@lists.gentoo.org" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 (1.0) X-Archives-Salt: 6b460f69-ab14-4802-98bb-f4bebc08329b X-Archives-Hash: 4c1eaf88b679ec88588e8d7b7088767d > On Mar 17, 2015, at 21:52, German wrote: >=20 > On Tue, 17 Mar 2015 20:39:46 +0200 > Matti Nykyri wrote: >=20 >>> On Mar 17, 2015, at 19:33, German wrote: >>>=20 >>> On Tue, 17 Mar 2015 19:16:42 +0200 >>> Matti Nykyri wrote: >>>=20 >>>>>> On Mar 17, 2015, at 18:11, German wrote: >>>>>>=20 >>>>>> Don't hit your head to a brick wall. A small strace to the login proc= ess reveals that login set things as you tell it to in /etc/login.defs >>>>>>=20 >>>>>> In this file change the line: >>>>>> TTYPERM 0600 >>>>>> To: >>>>>> TTYPERM 0620 >>>>>>=20 >>>>>> And your problem is fixed. >>>>>=20 >>>>> Sorry, this didn't fix it >>>>=20 >>>> Yes. Sorry. The mode was wrong: >>>>=20 >>>> TTYPERM 660 >>>>=20 >>>> Will fix it, if your screen is setgid tty and ttyX is gid tty. If not t= hen: >>>>=20 >>>> TTYPERM 666 >>>>=20 >>>> Will fix it, but also your tty will be world readable. If you don't con= sider that too big security risk, then just go >>>=20 >>> Neither 660 nor 666 fixed it. Sorry :( >>=20 >> If you have: >>=20 >> TTYPERM 0666 >>=20 >> And logout and login. What mode and ownership do you have in you tty (/de= v/ttyX)? >=20 > Ok, Matti, 0666 worked, now I can run screen as a user. Thanks. Do you thi= nk I have to try to run it 0660? Will it be less security risk? Well 0666 =3D 666. The reason it now worked is because you logged out and th= en back in. This is becaus login program only reads the /etc/login.defs-file= when you login. With mode 0666 every user on your computer can read everything (every charac= ter) you have in your screen (so not much privacy). If you set: TTYGROUP utmp TTYPERM 0660 And have: -rwxr-sr-x root utmp /usr/bin/screen Everything will also work and you have more privacy. When /bin/login us run it changes ownership of the tty to the user who logs i= n. Su -l does not do this. That is why the screen doesn't work. ConsoleKit i= s the program that is responsible for many of these permission changes. Do y= ou have that installed? --=20 -Matti