Subject: plot2d in Lisp CGI (was: plot2d output "")
From: Robert Dodier
Date: Wed, 19 Sep 2007 08:25:45 -0600
On 9/19/07, Yigal Asnis <yigalasnis at yahoo.com> wrote:
> The error in Apache log is "UNIX error 13 (EACCES): Permission denied".
> I tryed to run the script from a console:
> If I log in as root, there is no problem - plot is created.
> If I log in as non-root (my regulary user "yigal") I get the same error as
> in Apache log above.
> I checked the permissions of gnuplot - it can be executed by everyone.
> I tryed to create output file in directory that everyone can write in :
> [gnuplot_out_file "/tmp/outfile.ps"], but still have the same error.
> Finally, I runned
> clisp -M -maxima.mem
> from my non-root-user terminal (usually I use root terminal) and tryed
> #$plot2d (sin(x), [x,-1,1], [gnuplot_term, ps], [gnuplot_out_file
> "/tmp/outfile.ps"])$
> and still have the same error!
> What else can be wrong with permissions?
Yigal, something to look at --- Maxima may be trying to create a
temporary output file maxout.gnuplot in the directory maxima_tempdir.
Try assigning maxima_tempdir : "/tmp", does that help?
However if Apache runs after chroot then maxima_tempdir must
name a directory within the new root.
With plot_format=gnuplot_pipes I would expect that no temporary
file is created --- maybe that would help.
Apache probably runs as user=httpd or user=nobody or something
like that. Although that may not make a difference in this case.
Sorry I can't be more helpful,
Robert Dodier