Bug 137181 - /dev/pts/1 permissions problems when changing user
Summary: /dev/pts/1 permissions problems when changing user
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-10-26 15:16 UTC by Nils O. Selåsdal
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2004-12-03 12:35:41 UTC

Attachments (Terms of Use)

Description Nils O. Selåsdal 2004-10-26 15:16:22 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020

Description of problem:
I'm sorry if udev is not at fault here, but I really don't know whose
fault it is.
The following shouls show the problem:

[noselasd@asgaard SPECS]$ screen
[noselasd@asgaard SPECS]$ su -
[root@asgaard ~]# su - grog
[grog@asgaard ~]$ screen
Cannot open your terminal '/dev/pts/1' - please check.
[grog@asgaard ~]$ ll /dev/pts/1
crw--w----  1 noselasd tty 136, 1 Oct 26 17:14 /dev/pts/1
[grog@asgaard ~]$

Seems like changing a user breaks stuff. Loggin in via ssh or on
console makes screen work..

Version-Release number of selected component (if applicable):
Rawhide as of 2004.10.26 ,  kernel-2.6.9-1.640

How reproducible:

Steps to Reproduce:
1. Log in as user 
2. su -       to root
2. su - someuser    to another normal user 
3. run e.g. screen
4. screen compains about /dev/pts/1 , I'd expect this is a screen
problem, as /dev/pts/1 seems to be at fault !?

Additional info:

Comment 1 Harald Hoyer 2004-10-27 08:45:30 UTC
This is a problem, but could be solved either by manually 
# chown grog /dev/pts/1
# su - grog

or by blaming su not to change the ownership of the current terminal,
which may be not a good idea. I suspect NOTABUG...

Comment 2 Tim Waugh 2004-10-27 12:20:36 UTC
Is this to do with bug #132914?

Comment 3 Harald Hoyer 2004-10-27 12:47:01 UTC
hmm, not really...
we did
# su -
cause we are root, we have access to
$ ll /dev/pts/1
crw--w----  1 noselasd tty 136, 1 Oct 26 17:14 /dev/pts/1
then we
# su - grog
new we are user grog and do not have permissions to write to
"/dev/pts/1"... with or without selinux, I guess..

Comment 4 Tim Waugh 2004-12-03 12:35:41 UTC
Oh, I see.  It's always done this as far as I recall, and I think it's intended

I'm going to close this WONTFIX, since changing this could very well break
things.  Aside from that, there would be problems with restoring ownership,
especially in the case of not passing through user root but becoming another
non-root user directly.

Note You need to log in before you can comment on or make changes to this bug.