Bug 507667 - 'write' does not work
Summary: 'write' does not work
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux-ng
Version: 11
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-23 17:25 UTC by John Koelndorfer
Modified: 2009-09-17 10:16 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-09-17 10:16:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Koelndorfer 2009-06-23 17:25:13 UTC
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 17:27:24 UTC
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 19:07:04 UTC
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 20:07:43 UTC
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!
^C

Comment 4 John Koelndorfer 2009-06-23 20:13:00 UTC
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 08:18:13 UTC
(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 10:16:12 UTC
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.