"make" command permission denied

Jude Maranga Source

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:

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


comments powered by Disqus