Is there any special permission or setting in order to execute a python script that create a new file or image? This is my code:
<?
function py(){
exec( 'python my_script.py');
echo "ok";
}
py();
?>
And this is my python script (an example):
#!/usr/bin/python
import sys
f = open('out.txt', 'w')
print >> f, 'thats all'
f.close()
Running php i get "ok" message but no file is created. What am i doing wrong?

www-user. So the Python script would be stared from the same user. Doeswww-userhas the desired permissions to execute the Python script and access file-system for file-creation?www-useryou could either change the user towww-useror pass the desired user name to theexeccommand as shown here