Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to execute a PHP file through a Python server. However, I get the following error:

File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/", line 255, in run_cgi os.execve(scriptfile, args, os.environ) OSError: [Errno 13] Permission denied

The python server is running though.

What have I done so far?

  1. Chmod'ed recursively all directories to (chmod -R a+x) (I know this is not secure but its just for testing purposes) for both Python installation directories and my scripts.
  2. Tried to find out if python server is running as root through ps aux grep py

I am out of ideas. What could be going wrong else? Thanks for the feedback.

share|improve this question
Can you execute the script if you're running as the same user as the Python server? Is your server running AppArmor or SELinux? – Insyte Mar 30 '10 at 20:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.