ahTri
asked on
Permission denied
I'm using a SUN server and while using
echo "Yoh" > /dev/pts/x (x is a number)
I can send the message to myself, or when I'm root, I can send mesg to user but user cannot send message to each other, error message is "permission denied", what can I do with this ?
echo "Yoh" > /dev/pts/x (x is a number)
I can send the message to myself, or when I'm root, I can send mesg to user but user cannot send message to each other, error message is "permission denied", what can I do with this ?
ASKER
it gotta be something relate to tty because currently every user have mesg on, can talk, can write ...
Have you checked the permissions on the /dev/pts/#? I just checked my nonsecure development machine (IBM RS/6000) and the permissions are set to rw--w--w- so everyone has write access to my tty so a "echo message > /dev/pts/#" would work.
ASKER
I did try but onn SUN /dev/pts/# is just a link to ../devices/pseudo/..... so cannot change access right
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't think you need suid on write(1) and I know that you don't on talk(1).
ASKER
festive, is that a script to run on root ?
#!/bin/sh -p
this line doesn't run, maybe I don't have sh
#!/bin/sh -p
this line doesn't run, maybe I don't have sh
this script to run needs to be setuid root, and the top line means that it is a bourne shell script.
There are facilities within Unix specifically for this purpose. Look at the man pages for wall(1M), write(1), mesg(1), and talk(1). Probably the one you want is write(1).