help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Using Octave in a CGI script. I think I fixed it.


From: John Verzani
Subject: RE: Using Octave in a CGI script. I think I fixed it.
Date: 11 Sep 1998 09:04:22 -0000

Thanks to everyone who offered advice with this. It turns out that I
needed the doexec command (atleast that's what it looks like.) I was
also given two interesting sites which I'll repeat here as a summary:

1. http://www.mathwizards.com/ -- this is site for a commercial product
   MathXplorer/JS which allows a user to use MATLAB commands. It looks 
   nice, but has a price.

2. http://www.ma.utexas.edu/users/wfs/netmath/netmath.html. This is a
   link to several math packages that can be run on-line. The only
   drawback with this seems to be the fact that I am stuck supporting
   a windoze 3.1 platform

I currently have a working script. If anybody with knowledge of
security traps would like to have a look to see if they can crack it
please let me know and I can email a url. As well, if anybody is
interested in providing such a service I can e-mail the perl script
that makes it all work along with installation instructions.


John Verzani writes:
 > 
 > Hello,
 > 
 > I've been working on a CGI script that allows students to use Octave
 > via the web. To eliminate (I hope!) the possibility of a malicious
 > student destroying the server it is running on, I am using a package
 > called sbox which runs the script as a restricted user after issuing a
 > chroot command. So, in theory, the system calls in octave only have
 > access to the files I put into the new root directory. Basically I've
 > put in perl, octave, gnuplot and whatever libraries these need to
 > run. Everything seems to work well, except for one thing. Gnuplot
 > doesn't work. I know this has something to do with running gnuplot in
 > the chroot setting, as the script works when I don't care about
 > security. If I try running Octave at the command line after a chroot
 > command I get an error message of this type when trying to plot:
 > 
 > [Levy]# chroot ~octave/ ./octave
 > Octave, version 2.0.13 (sparc-unknown-linux-gnulibc1).
 > Copyright (C) 1996, 1997, 1998 John W. Eaton.
 > This is free software with ABSOLUTELY NO WARRANTY.
 > For details, type `warranty'.
 > 
 > octave:1> x = 1:5;plot(x)
 > warning: connection to external plotter (pid = 16515) lost --
 > warning: please try your plot command(s) again
 > warning: connection to external plotter (pid = 16516) lost --
 > warning: please try your plot command(s) again
 > octave:2> octave:2> warning: connection to external plotter (pid = 16517) 
 > lost --
 > warning: please try your plot command(s) again
 > 
 > octave:2> 
 > 
 > My question is: what things need to be available to octave to create the
 > subprocess that will allow gnuplot to run as the external plotter?
 > 
 > Thanks for any pointers.
 > 
 > John
 > 
 > ....................................................................
 > .  John Verzani                  mailto:address@hidden  .
 > .  Dept. of Mathematics      http://www.math.csi.cuny.edu/~verzani .
 > .  City University of New York                 tel: (718) 982-3623 .
 > .  College of Staten Island                    fax: (718) 982-3631 .
 > ....................................................................
 > 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]