title: Permission error 13 Python 3.5.2
body: <p>I have a problem opening a file with Python script in windows 10.</p>
  
  <p>What I do is next:</p>
  
  <p>I open my script as administrator in which create a new directory in the route:</p>
  
  <blockquote>
    <p>C:\ProgramData\New_folder</p>
  </blockquote>
  
  <p>Inside that folder I create a txt file:</p>
  
  <blockquote>
    <p>C:\ProgramData\New_folder\log.txt</p>
  </blockquote>
  
  <p>After that the program put some text in the log.txt and finish.</p>
  
  <p>Now I have to open the script normally not as admin and when the program start it launch an permission error 13 in the following line of code.</p>
  
  <pre><code>dirLog = 'C:\ProgramData\New_folder\log.txt'
  output = open(dirLog, "a")
  </code></pre>
  
  <p>I really don't know what is happening here because I check the file created and it has read and write permissions.</p>
  
  <p>it's of vital importance open the script as admin just the first time, the rest just normally.</p>