I'm having an error for what seems to be a permissions problem when trying to create a zip file in a specified folder
p= subprocess.Popen(['7z','a','-pinfected','-y','/home/John/testfolder/yada.zip'] + ['test.txt'],stdout=PIPE.subprocess,stderr=PIPE.subprocess)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/subprocess.py", line 710, in __init__
File "/usr/local/lib/python2.7/subprocess.py", line 1327, in _execute_child
OSError: [Errno 13] Permission denied
drwxr-xr-x means that:
1] only the directory's owner can list its contents, create new files in it (elevated access) etc.,
2] members of the directory's group and other users can also list its contents, and have simple access to it.
So in fact you don't have to change the directory's permissions unless you know what you are doing, you could just run your script with
sudo python my_script.py.