Bug 507667 - 'write' does not work
'write' does not work
Product: Fedora
Classification: Fedora
Component: util-linux-ng (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Karel Zak
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-06-23 13:25 EDT by John Koelndorfer
Modified: 2009-09-17 06:16 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-17 06:16:12 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 John Koelndorfer 2009-06-23 13:25:13 EDT
Description of problem:
write (CLI application) does not work, and to my knowledge cannot be made to work without chowning ttys (though I have not tried).

Version-Release number of selected component (if applicable):
Unknown. -v, -V, or --version. Man page does not provide a version.

How reproducible:
Every time.

Steps to Reproduce:
1. Attempt to write a user. `write user`. Write claims you don't have write permissions on.
2. Attempt to turn on write permissions via `mesg y`
Actual results:
`mesg y` complains: "mesg: error: tty device is not owned by group `tty'" Writing continues to not work.

Expected results:
mesg enables writing. write should then work.

Additional info:
Comment 1 John Koelndorfer 2009-06-23 13:27:24 EDT
Can't edit comments? Above, meant to say that -v, -V, and --version all fail to return version info.
Comment 2 Ondrej Vasik 2009-06-23 15:07:04 EDT
Yep, you can't edit ... additionally - write is not part of coreutils, it is from util-linux-ng, reassigning.
Comment 3 Karel Zak 2009-06-23 16:07:43 EDT
I can't reproduce this problem. Please, check who(1) output and tty permissions.

$ who
test     tty2         2009-06-23 22:01
kzak     tty1         2009-06-22 15:29 (:0)
kzak     pts/0        2009-06-23 20:15 (:0.0)
kzak     pts/2        2009-06-23 20:25 (:0.0)
kzak     pts/3        2009-06-23 20:28 (:0.0)
kzak     pts/4        2009-06-23 20:34 (:0.0)
kzak     pts/5        2009-06-23 21:34 (:0.0)
kzak     pts/6        2009-06-23 20:43 (:0.0)

$ ll /dev/tty2
crw--w---- 1 test tty 4, 2 2009-06-23 22:05 /dev/tty2

$ write test
Hello World!
Comment 4 John Koelndorfer 2009-06-23 16:13:00 EDT
I also have screen running. I notice that the /dev/pts/x files screen is using are owned by group screen.
Comment 5 Karel Zak 2009-06-24 04:18:13 EDT
(In reply to comment #4)
> I also have screen running. I notice that the /dev/pts/x files screen is using
> are owned by group screen.  

On my system all active /dev/pts/x files (include screen stuff) are owned by user and tty group. I can write to/from screen tty.

Anyway, write(1) requires that the tty is owned by tty group -- write(1) has s-bit on group:

# ls -la /usr/bin/write
-rwxr-sr-x 1 root tty 11936 2009-06-10 15:04 /usr/bin/write
      ^           ^^^
Comment 6 Karel Zak 2009-09-17 06:16:12 EDT
Closing... Please, reopen if you believe that the problem is reproduce able on the currently supported Fedora releases. Thanks.

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