code: public static final void setPermission(Path path, String perms) throws IOException
      {
          checkFileType(path, perms);
          if (supports("posix"))
          {
              Set<PosixFilePermission> posixPerms = PosixFilePermissions.fromString(permsPart(perms));
              Files.setPosixFilePermissions(path, posixPerms);
          }
          else
          {
              JavaLogging.getLogger(PosixHelp.class).warning("no posix support. setPermission(%s, %s)", path, perms);
          }
      }
docs: Set posix permissions if supported.
  @param path
  @param perms 10 or 9 length E.g. -rwxr--r--
  @throws java.io.IOException