I am developing module for web server. In one of my php modules I am using system($command, $response) call in order to execute python script, but I get response "1" which means "operation not permitted". I did the following actions in order to solve this problem, but nothing helped:

chmod 777 for every php file in execution pipeline and chmod 777 for executed my_python_script.py.
chown my_server_daemon for my_python_script.py.

A little more useful information for case understanding:

Server system: Linux 2.6.32-042stab141.3 x86_64 GNU/Linux
Python file was written on Win10, but line ending were changed using dos2unix my_python_script.py

Do you have any ideas how to solve this problem? Everything works fine, when I execute script manually in terminal, but fails, when I try to do this using PHP system().
The question is closed. It's really stupid, I didn't pay attention that my_python_script.py works with external .txt file, which hadn't write permission for other users. Be careful :)
Can't execute python script via system() call in PHP