If a demonstration wanted to run this from cgi, there seem two possible ways,
which is complicated only by the fact that GIMP calls its batch stack from a specific path, which is what this writes to with parameters on image location.
So would it be better, as a test case to:
a) set a sticky bit on the directory
.gimp-1.2/scripts
such that apache's user is able to write to it
-srwxrwxr-x 1 user apache myscript.scm
b) just prepare a fixed set of scheme scripts and call them through appropriately protected shell calls within the cgi--like any ofther system utility.
Thanks for your suggestions.