Python cgi Apache os.system()

Cameron Walsh cameron.walsh at
Thu Nov 9 03:30:15 CET 2006

naima.mans at wrote:
> Hello :)
> I have installed Apache on windows...
> The server work well, and my python script also
> but when I want in my python script to run a System command like
> os.system(my_command) the script doesn't do anything!
> here the error.log
> [Wed Nov 08 14:19:30 2006] [error] [client] The system cannot
> find the drive specified.\r, referer:
> When i run the python script manually it works!
> i think it's a user access probleme but i don't know how to resolve it
> !
> please help .... 
> thanks

Without knowing what "my_command" is, all I can suggest is that
"my_command" might be referring to a file that is in your user path, but
not in the path of the user used to run apache or python (which could be

Depending on how securely your server is configured, you may be able to
access whichever file it is looking for if you specify the full path to
the file, or the relative path from the server root directory (watch out
for hardlinks/softlinks.)


More information about the Python-list mailing list