The purpose of the write command is to send msg to a user logged in a tty. In order for this command to work, the receiver should set write permission on his tty for the group. This is necessary since:
- the /dev/ttyXXXbelongs to the tty group
- the writecommand is using SGID with the tty group to let users have a chance to write to someone's tty
Ok. Now, if the sender don't set write permission for his own tty, he can't write to someone else tty's.
I can't see any technical grounds for this! Is this just to preserve some kind of politeness? And even in this case, why does the wall command don't follow the same principle? Anyone can use wall while his mesg says n....
Am I missing something?
 
     
    