Help - Search - Members - Calendar
Full Version: System(" ");
Linuxhelp > Support > Programming in Linux
I'm tring to write a prgram that I can input some text on my hosted web page, then display the text with the wall commande.
From a shell if i issue the command echo "hello world" | wall . all is good
If in my cgi (written in c/++) I can use system("mkdir"); it works. But if i try system("echo hello | wall"); it does not.

What am I doing wrong?

P.s. I know this is not a good idea for security issues .ie if the text was mail /etc/paswd/; hello world , but i want to be able to do this...
I cant give you the solution.I can only, give you the reason.

And the most probable one is, Apache user doesnt have persmissions to write to ttys.

I have never seen,such scripts.Can you post the whole script?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.