code: @Override
    void setup() {
      super.setup();
      //set up job cache directory and associated permissions
      String localDirs[] = this.mapredLocalDirs;
      for(String localDir : localDirs) {
        //Cache root
        File cacheDirectory = new File(localDir,TaskTracker.getCacheSubdir());
        File jobCacheDirectory = new File(localDir,TaskTracker.getJobCacheSubdir());
        if(!cacheDirectory.exists()) {
          if(!cacheDirectory.mkdirs()) {
            LOG.warn("Unable to create cache directory : " + 
                cacheDirectory.getPath());
          }
        }
        if(!jobCacheDirectory.exists()) {
          if(!jobCacheDirectory.mkdirs()) {
            LOG.warn("Unable to create job cache directory : " + 
                jobCacheDirectory.getPath());
          }
        }
        //Give world writable permission for every directory under
        //mapred-local-dir.
        //Child tries to write files under it when executing.
        changeDirectoryPermissions(localDir, FILE_PERMISSIONS, true);
      }//end of local directory manipulations
      //setting up perms for user logs
      File taskLog = TaskLog.getUserLogDir();
      changeDirectoryPermissions(taskLog.getPath(), FILE_PERMISSIONS,false);
    }
docs: Sets up the permissions of the following directories:
  
  Job cache directory
  Archive directory
  Hadoop log directories