code: private boolean canWriteInCurrentWorkingDirectory(final String effectiveUser)
        throws IOException {
      final ExecuteAsUser executeAsUser = new ExecuteAsUser(
          this.getSysProps().getString(AZKABAN_SERVER_NATIVE_LIB_FOLDER));
      final List<String> checkIfUserCanWriteCommand = Arrays
          .asList(CREATE_FILE, getWorkingDirectory() + "/" + TEMP_FILE_NAME);
      final int result = executeAsUser.execute(effectiveUser, checkIfUserCanWriteCommand);
      return result == SUCCESSFUL_EXECUTION;
    }
docs: Checks to see if user has write access to current working directory which many users need for
  their jobs to store temporary data/jars on the executor.
  
  Accomplishes this by using execute-as-user to try to create an empty file in the cwd.
  
  @param effectiveUser user/proxy user running the job
  @return true if user has write permissions in current working directory otherwise false