title: Java can't create file unless admin even with permissions set for everyone
body: <p>So I am working on Java app that does some operations with files, app only works when ran with admin privileges, problem is that app needs to be used on bunch of machines by clients that don't (and should not) have admin credentials.  </p>
  
  <pre><code>try (InputStream in = url.openStream()) {
  
              Files.copy(in, Paths.get("allDocs.zip"), StandardCopyOption.REPLACE_EXISTING);
  
          }
  </code></pre>
  
  <p>Exception gets thrown on Files.copy line: java.nio.file.AccessDeniedException: allDocs.zip</p>
  
  <p>Thing is, I tried putting files in Public folder, in user home dir, in AppData, in app instalation dir, in folder for which I set that every user have full control... I always get java.nio.file.AccessDeniedException unless i run program with admin account. Why is this happening? If user that starts Java  process have permissions to write why Java process can't? Thanks in advance</p>