code: private void assignPermissions(final String user, final File tokenFile, final Logger logger)
        throws IOException {
      final List<String> changePermissionsCommand = Arrays.asList(
          CHMOD, TOKEN_FILE_PERMISSIONS, tokenFile.getAbsolutePath()
      );
      int result = this.executeAsUser
          .execute(System.getProperty("user.name"), changePermissionsCommand);
      if (result != 0) {
        throw new IOException("Unable to modify permissions. User: " + user);
      }
  
      final List<String> changeOwnershipCommand = Arrays.asList(
          CHOWN, user + ":" + GROUP_NAME, tokenFile.getAbsolutePath()
      );
      result = this.executeAsUser.execute("root", changeOwnershipCommand);
      if (result != 0) {
        throw new IOException("Unable to set ownership. User: " + user);
      }
    }
docs: Uses execute-as-user binary to reassign file permissions to be readable only by that user.
  
  Step 1. Set file permissions to 460. Readable to self and readable / writable azkaban group
  Step 2. Set user as owner of file.
  
  @param user user to be proxied
  @param tokenFile file to be written
  @param logger logger to use