[Zope] system calls

Casey Duncan cduncan@kaivo.com
Fri, 09 Mar 2001 08:12:56 -0700


"Arenz, Ralph" wrote:
> 
> Hi,
> 
> i' am using external methods in zope and in this external methods (python
> module(s))
> i try to do a system call via the module os.
> A  little more concrete:
> 
>         1) assume that the the python module is foo.
> 
>         2) In Zope i have defined the external method call_pdflatex
>             in the module foo
> 
>         3)The system command in foo is:
>                 os.system( 'pdflatex -interactions= '"nonstopmode"'
> [path]')
> 
>         4)The Folders which resides on the filesystem (linux)have  the right
> group and user
>            adjustments according to that of Zope.
> 
>         5)Starting python the interactive way(as root or as ather user) and
> testing the system-call
>            will return the right result.
> 
>         6)Also positiv is to call a system command which causes no
> fileoperation like 'ping' or 'echo'
>            form Zope via external method
> 
> As you can see in point 5 it is no problem by python e.g no permissions to
> write to a file or a folder.
> In fact it is a Zope problem (I suppose !).
> Is there a way to grant a permission to Zope (External Method Product) to
> allow system calls ??
> Can anybody help me ?
> 
> I'am running out of ideas.
> 
> Ralph
> 

There is no restrictions on what you can do in an external method in
regards to the OS and file system. From what you say, your Zope user has
been given proper rights to the filesystem and you have tested this via
the Python interpreter as the Zope user. Is this correct?

If this is true, please post the traceback you are getting, and maybe
that will lend some insight. It may be for instance, that you have not
granted permission for Zope to access the method or function you have
written. I would need to see your code to know if this is the case or
not.
-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>