title: java.lang.UnsupportedOperationException: 'posix:permissions' not supported as initial attribute on Windows
body: <p>I am using Java 7 File API. I wrote a class that is working fine on Ubuntu creating directories perfectly, but when I run same code on Windows then it is throwing error:</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsupportedOperationException: 'posix:permissions' not supported as initial attribute
      at sun.nio.fs.WindowsSecurityDescriptor.fromAttribute(Unknown Source)
      at sun.nio.fs.WindowsFileSystemProvider.createDirectory(Unknown Source)
      at java.nio.file.Files.createDirectory(Unknown Source)
      at java.nio.file.Files.createAndCheckIsDirectory(Unknown Source)
      at java.nio.file.Files.createDirectories(Unknown Source)
      at com.cloudspoke.folder_permission.Folder.createFolder(Folder.java:27)
      at com.cloudspoke.folder_permission.Main.main(Main.java:139)
  </code></pre>
  
  <p>My Folder class code is</p>
  
  <pre><code>package com.cloudspoke.folder_permission;
  
  import java.io.IOException;
  import java.nio.file.Files;
  import java.nio.file.Path;
  import java.nio.file.attribute.FileAttribute;
  import java.nio.file.attribute.PosixFilePermission;
  import java.nio.file.attribute.UserPrincipal;
  import java.util.Set;
  
  public class Folder{
      // attributes required for creating a Folder
      private UserPrincipal owner;
      private Path folder_name;
      private FileAttribute&lt;Set&lt;PosixFilePermission&gt;&gt; attr;
  
  
      public Folder(UserPrincipal owner,Path folder_name,FileAttribute&lt;Set&lt;PosixFilePermission&gt;&gt; attr){
          this.owner=owner;
          this.folder_name=folder_name;
          this.attr=attr;
      }
      //invoking this method will create folders
      public  void createFolder(){
          try {
              //createDirectories function is used for overwriting existing folder instead of createDirectory() method
              Files.createDirectories(folder_name, attr);
              Files.setOwner(folder_name, owner);
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
          System.out.println("created Folder "+this.folder_name);
  
      }
  }
  </code></pre>
  
  <p>The error is coming from <code>createFolder</code> method of <code>Folder</code>.</p>
  
  <p>How do I resolve this error?</p>