Bug 137181 - /dev/pts/1 permissions problems when changing user
/dev/pts/1 permissions problems when changing user
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
rawhide
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-26 11:16 EDT by Nils O. Selåsdal
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-03 07:35:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

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

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
[detached]
[noselasd@asgaard SPECS]$ su -
Password:
[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:
Always

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 04:45:30 EDT
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 08:20:36 EDT
Is this to do with bug #132914?
Comment 3 Harald Hoyer 2004-10-27 08:47:01 EDT
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 07:35:41 EST
Oh, I see.  It's always done this as far as I recall, and I think it's intended
behaviour.

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.