Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with system call & rsh

Status
Not open for further replies.

nappaji

Programmer
Mar 21, 2001
76
US
Hi,
my web server is a linux machine.
I'm trying to execute the following statement from within a cgi script, but it seem to not work when run from a browser. But if I run the cgi script from the command line , it works.

Here it is:

system("rsh server1 \"cd \/nappaji\/spc_charts\/; sas c_greplay_new.sas;\"");

This statement is within a CGI script. All it does is rsh onto the server server1 , cd onto my directory and execute a script. (sas is a statistical analysis tool).

I'm unable to figure out why it works from the CGI script works from the command line but not from the browser.

Please help
Thanks
 
dUDE, TrY tHIS,

system('rsh server1 \"cd \/nappaji\/spc_charts\/; sas c_greplay_new.sas;\"');


Hope this would help you



 
maybe a permissions problem...????
Make sure that the web server daemon has sufficient permissions to read/write and play with all the files/directories on which the sas process is dependent. When you run a command via a CGI, that command runs as a different user than it does when you run from a prompt (where it runs as you).

HTH Please use descriptive titles and check the FAQs.
And, beware the evil typo.
TMTOWTDI ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top