Bug 109589 - mesg fails with device not owned by group `tty' error
mesg fails with device not owned by group `tty' error
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2003-11-09 16:46 EST by Michael Fischer
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:
Last Closed: 2004-09-29 15:38:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Fischer 2003-11-09 16:46:20 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

Description of problem:
When I type "mesg y" into a tcsh shell running inside a kde terminal
window, I get the response:
mesg: error: tty device is not owned by group `tty'
Looking in /dev/pts/, all of the files there belong to my default
group, not by "tty".
However, if I log in remotely using ssh, then the corresponding file
(e.g., /dev/pts/22) does belong to group "tty", and mesg y works.

Problem might be in /usr/bin/konsole in component kdebase-3.1.4-6.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Open KDE terminal window.
2.Type "mesg y"


Actual Results:  mesg: error: tty device is not owned by group `tty'

Expected Results:  Null response; mesg access enabled.

Additional info:
Comment 1 Bennett Feitell 2003-11-10 16:56:38 EST
I wonder if this is related to the cannot chownpty error messages
produced by konsole when it is started by a non-root user?

--error text follows
konsole: cannot chown /dev/pts/3.
Reason: Operation not permitted
konsole_grantpty not installed root-suid
konsole: chownpty failed for device /dev/pts/3::/dev/pts/3.
       : This means the session can be eavesdroped.
       : Make sure konsole_grantpty is installed in
       : /usr/bin/ and setuid root.
Comment 2 Michael Fischer 2003-11-10 17:24:06 EST
/usr/bin/konsole_grantpty was installed with suid bit turned off.  I
turned it on and restarted kde, but the problem continues.  However,
if I run konsole as root, then the corresponding /dev/pts/ device does
end up with gid=tty as it should.
Comment 3 JLapham 2003-11-19 06:08:03 EST
<aol>I'm seeing this problem too</aol>

Every time I log into my machine I see the "mesg: error: tty device is
not owned by group `tty'" because I have "mesg y" in my .bashrc.  Ugh.
Comment 4 JLapham 2003-11-19 06:11:46 EST
Oh, I should add that this probably has nothing to do with Component:
kdebase, as I do not have KDE installed and I see the same message. 
Michael, I'm guessing it would be better to change the component to
MAKEDEV or bash.
Comment 5 Michael Fischer 2003-11-19 15:01:07 EST
This may be a kernel bug.  I've written C test programs to create a
pty using either getpt(), open("/dev/ptmx",...), or openpty().  In all
cases, the newly created device /dev/pts/nn has uid and gid of the
calling process, not the gid specified when /dev/pts was mounted. 
Mount shows
   none on /dev/pts type devpts (rw,gid=5,mode=620)
so the /etc/fstab entry is being processed, but the setgid 5 for the
new slave device is not happening.  My test programs work correctly
when compiled and run on a RH9 system.
I'm changing component to "kernel".
Comment 6 David Lawrence 2004-09-29 15:38:55 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

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