[Lispweb] Question: problem with execute rights in clisp cgi, :MAY-EXEC ?
rso at gmx.at
rso at gmx.at
Thu Apr 20 07:37:53 CDT 2006
Hallo,
I have a unix (freebsd) specific problem, at least that is what I think. Here is the situation:
I run a clisp cgi script in apache2 in a directory with permissions 777. This clisp script creates a
file example.tex
Then I let lisp execute a perl script with this function:
(defun makePicFile (input texSource)
"creates picture file with same name as html file but different ending, returns the name of the
picture"
(EXT:RUN-PROGRAM "./textogif" :ARGUMENTS
(list "-png"
(writeToFile (mkName input ".tex")
texSource))
:OUTPUT NIL)
(mkName input ".png"))
Now all this worked fine on a ubuntu linux system, but unfortunately not on the freebsd system.
I changed the header of the perl script, it has all the permissions. If I start the perl script
manually as a user everything works fine. It creates the file, makes the system calls etc. So it is
not the problem of the perl script.
If the perl script (started by clisp) is run by the apache user www it fails at the first system call:
echo x | latex example.tex returns: Error processing Command and the perl script exits. Which I know
from reading the httpd-error.log file.
So I thought this is a problem of permissions.
In [1] I found the keyword :MAY-EXEC specifically for unix systems. So I added :MAY-EXEC T to the
makePicFile function above. But this gave me the error:
*** - RUN-PROGRAM: illegal keyword/value pair :MAY-EXEC, T in argument list. The allowed keywords
are (:ARGUMENTS :INPUT :OUTPUT :IF-OUTPUT-EXISTS :WAIT)
So I guess this does not exist anymore or in my clisp version?
(GNU CLISP 2.38 (2006-01-24) (built 3353839801)
C-MODULS: contains 'syscalls' too
How could I solve this problem? How can I use the :MAY-EXEC keyword?
Is this the right approach? The error might lie in my apache configuration too, but the only thing I
found was suExec which doesn't seem to be right.
Thanks a lot for your help!
Richard
[1] http://www.gnu.org/software/clisp/impnotes/shell.html
More information about the lispweb
mailing list