“make” command permission denied

Multi tool use
“make” command permission denied
I have a Django application which has a custom folder I named codefiles
. Inside it, are many subfolders with random names. Further, inside each of those folder, is a Makefile. I'm currently confused why it says OSError: [Errno 13] Permission denied
when I call the following code:
codefiles
OSError: [Errno 13] Permission denied
p = subprocess.Popen(["make", "-f", os.path.join(directory, "Makefile")], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True, shell=True)
What might be the problem here?
EDIT:
Even calling the following code below causes a Permission denied error:
current_directory = os.getcwd()
logging.debug("current_dir: " + str(current_directory));
EDIT2: This is getting weirder and weirder. Even a comment results a Permission denied error. Here is the error log:
File "./src/tasks/views.py", line 1178, in test_run_code
# create the make file
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
@DiegoContreras I already did. All the permissions are already 0777
– Jude Maranga
5 mins ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
change folder permissions?
– Diego Contreras
8 mins ago