pentaho/pentaho-kettle · error · KettleException

Following required files are not accessible

Error message

Following required files are not accessible: {message}

What it means

During initialization the TextFileInput step checks that all matched files are readable. If any file exists but cannot be accessed (permissions, lock, mount issue) and error-ignoring is not enabled, it throws 'Following required files are not accessible: <list>'.

Solutions

  1. Check and fix OS permissions (chmod/chown) or run the transformation under a user with read access.
  2. Verify the storage location is mounted/online (ls the directory, test SFTP connectivity).
  3. Ensure no other process holds an exclusive lock on the files; coordinate with the producer job.
  4. Enable error-ignored handling for non-accessible files if partial processing is acceptable.

Example fix

// before: files owned by appuser, transformation runs as kettleuser -> not accessible
// after: grant read access
//   chmod o+r /data/incoming/*.csv  (or add kettleuser to the file group)
//   OR run the transformation as a user with the required permissions
Defensive patterns

Strategy: validation

Validate before calling

// Verify read access to each input file before the transformation runs
for (String p : filePaths) {
  Path path = Paths.get(p);
  if (!Files.isReadable(path)) {
    throw new AccessDeniedException(p); // fail fast with a clear message
  }
}

Try / catch

try {
  initStep(inputFiles);
} catch (KettleException e) {
  if (e.getMessage().contains("not accessible")) {
    logError("Fix permissions/mounts: " + e.getMessage());
  }
  throw e;
}

Prevention

When it happens

Trigger: Files matched by the input spec exist but the executing user lacks read permission, the file is locked by another process, or the storage location (NFS/SFTP mount) is unavailable.

Common situations: Running the transformation as a different OS user than the file owner, read-only or unmounted network shares, files still being written by an upstream process.

Understand the failure class

Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/ea3edfbd088e59b4. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/textfileinput/TextFileInput.java:1307

          data.dataErrorLineHandler.handleNonExistantFile( fileObject );
        }
      } else {
        throw new KettleException( "Following required files are missing: " + message );
      }
    }

    List<FileObject> nonAccessibleFiles = data.getFiles().getNonAccessibleFiles();
    if ( nonAccessibleFiles.size() != 0 ) {
      String message = FileInputList.getRequiredFilesDescription( nonAccessibleFiles );
      if ( log.isBasic() ) {
        log.logBasic( "Required files", "WARNING: Not accessible " + message );
      }
      if ( meta.isErrorIgnored() ) {
        for ( FileObject fileObject : nonAccessibleFiles ) {
          data.dataErrorLineHandler.handleNonAccessibleFile( fileObject );
        }
      } else {
        throw new KettleException( "Following required files are not accessible: " + message );
      }
    }
  }

  private boolean closeLastFile() {
    try {
      // Close previous file!
      if ( data.filename != null ) {
        // Increment the lines updated to reflect another file has been finished.
        // This allows us to give a state of progress in the run time metrics
        incrementLinesUpdated();
        /*
         * } else if ( sFileCompression != null && sFileCompression.equals( "Snappy" ) && data.sis != null ) {
         * data.sis.close(); }
         */
        data.in.close();
        data.isr.close();
        data.filename = null; // send it down the next time.

View on GitHub (pinned to f3058517a1)