title: Permission problem deleting file in python
body: <p>I generate a file in the <code>tmp</code> directory of my root server.</p>
  
  <pre><code>touch "sync.txt"
  chmod 777 "sync.txt"
  </code></pre>
  
  <p>and I try to delete it with python like this</p>
  
  <pre><code>os.remove('/tmp/sync.txt')
  </code></pre>
  
  <p>but I always get this error</p>
  
  <pre><code>exceptions.OSError: [Errno 1] Operation not permitted: '/tmp/sync.txt'
  </code></pre>
  
  <p>I thought this would be solved by settings the file permission to 777 but I still have this problem.</p>
  
  <p>When I make</p>
  
  <pre><code>chmod 777 /tmp
  </code></pre>
  
  <p>instead I get another error:</p>
  
  <pre><code>exceptions.OSError: [Errno 2] No such file or directory: '/tmp/sync.txt'
  </code></pre>
  
  <p>However the file is deleted.</p>
  
  <p>Any idea whats wrong? How can I fix that exception?</p>