title: Why did Python claim "No such file or directory" when opening a file in "a+" mode?
body: <p>I found this in my error logs today. Why would an "a+" file open operation fail? Permissions aren't actually supposed to be an issue here, because, the user with the python process has ownership of the <em>export_path</em>.</p>
  
  <pre><code>Traceback (most recent call last):
    [... omitted ...]
    File "exporting.py", line 131, in run
      f = open(fullpath, 'a+')
  IOError: [Errno 2] No such file or directory: u'/export_path/export_file.xml'
  </code></pre>
  
  <p>To be clear, yes, the directory exists; it's in Linux; and, the ownership chain looks like root -> user -> user -> user (ie: "user" can actually do whatever they want with that folder). This has been proven by successfully doing:</p>
  
  <pre><code>touch /export_path/some_brand_new_file
  </code></pre>
  
  <p>Also, doing <code>vim /export_path/export_file.xml</code> as user is fine, too.</p>