From help-octave-request at bevo dot che dot wisc dot edu Thu Sep 10 13:22:16 1998 Subject: Using Octave in a CGI script From: John Verzani To: Octave Mailing List Date: 10 Sep 1998 10:24:11 -0000 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:verzani at math dot csi dot cuny dot edu . . 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 . ....................................................................