I get this error while trying to trigger a Python script inside CGI from the browser;
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/CGIHTTPServer.py", line 251, in run_cgi
os.execve(scriptfile, args, env)
OSError: [Errno 13] Permission denied
1.0.0.127.in-addr.arpa - - [20/Apr/2013 14:51:16] CGI script exit status 0x7f00
I'm not running the main process as root ($ python-32 main.py
).
This topic did not seem to work for me.
Making the script executable also didn't work ($ chmod +x index.py
, -rwxr-xr-x
).
Finally got it to work. This is the basic script;
index.py
Requirements
$ chmod +x index.py
#!/usr/bin/env python
Hope it might help someone in the future.