title: PermissionError Errno 13 Permission denied
body: <p>I am trying to read a directory which contains html files with python. The code I am using is this: </p>
  
  <pre><code>    import os
  f = open(r"C:\Users\Grty\Desktop\de", "w+")
  for filename in os.listdir(os.getcwd()):
    content = f.read()
    print (filename, len(content))
  </code></pre>
  
  <p>The problem is I cant access the directory. I have tried different locations but the problem persists. I have also done the relative chmod 777 (Using windows 10) and still nothing. I enabled sharing with everyone, giving read/write permissions to everyone and also disabled the "read only" (which somehow is being re-enabled itself). I have also run the cmd as an admin and still no progress. Anyone got an idea of how to overcome this? </p>