code: @Override
    void enableTaskForCleanup(PathDeletionContext context)
        throws IOException {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Going to do " + TaskCommands.ENABLE_TASK_FOR_CLEANUP.toString()
                  + " for " + context.fullPath);
      }
  
      if (context instanceof TaskControllerPathDeletionContext) {
        TaskControllerPathDeletionContext tContext =
          (TaskControllerPathDeletionContext) context;
      
        if (tContext.task.getUser() != null &&
            tContext.fs instanceof LocalFileSystem) {
          try {
            runCommand(TaskCommands.ENABLE_TASK_FOR_CLEANUP,
                     tContext.task.getUser(),
                     buildTaskCleanupArgs(tContext), null, null);
          } catch(IOException e) {
            LOG.warn("Uanble to change permissions for " + tContext.fullPath);
          }
        }
        else {
          throw new IllegalArgumentException("Either user is null or the "  +
                                 "file system is not local file system.");
        }
      }
      else {
        throw new IllegalArgumentException("PathDeletionContext provided is not "
            + "TaskControllerPathDeletionContext.");
      }
    }
docs: Enables the task for cleanup by changing permissions of the specified path
  in the local filesystem