Using 7zip with python to create a passsword protected file in a given path
<p>I'm having an error for what seems to be a permissions problem when trying to create a zip file in a specified folder <code>testfolder</code> -folder has the following permissions:
drwxr-xr-x  193 nobody nobody
When trying to launch the following command in python I get the following:</p>

<p><code>p= subprocess.Popen(['7z','a','-pinfected','-y','/home/John/testfolder/yada.zip'] + ['test.txt'],stdout=PIPE.subprocess,stderr=PIPE.subprocess)</code></p>

<p><code>Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/usr/local/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/local/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied</code></p>

<p>Any idea what wrong with permissions?<br>
I pretty new to it ,my python runs from /usr/local/bin path</p>

<p>Try changing the permissions of the folder and see if it comes again:</p>

<pre><code>chmod -R 777 /foldername 
</code></pre>

python linux python-2.7 permissions permission-denied