title: Python mmap 'Permission denied' on Linux
body: <p>I have a really large file I'm trying to open with mmap and its giving me permission denied.  I've tried different flags and modes to the <code>os.open</code> but its just not working for me.</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>&gt;&gt;&gt; import os,mmap
  &gt;&gt;&gt; mfd = os.open('BigFile', 0)
  &gt;&gt;&gt; mfile = mmap.mmap(mfd, 0)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  mmap.error: [Errno 13] Permission denied
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>(using the built in <code>open()</code> works via the python docs example, but it seems to open more than one handle to the file both in read &amp; write mode.  All i need for the <code>mmap.mmap</code> method is the file number, so I wouldn't assume i need to create a <code>file</code> object; hence my attempt at using <code>os.open()</code>)</p>