Hello,

I want ask something about Python CGI

How can i use python on web application to run commands on the server

For example :
like in php when you will use "exec" function

#!/usr/bin/python
import os
print "Content-Type: text/html\n"
os.mkdir("/root/folder")
print "done"


this simple script working good if you run it from SSH "server root" but when i use it web application not working

any one can help me about this issue ?

Thanks

try this

os.system("mkdir /root/folder")
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.