{"record":{"id":"ea3edfbd088e59b4","repo":"pentaho/pentaho-kettle","slug":"following-required-files-are-not-accessible-message","errorCode":null,"errorMessage":"Following required files are not accessible: {message}","messagePattern":"Following required files are not accessible: (.+?)","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/textfileinput/TextFileInput.java","lineNumber":1307,"sourceCode":"          data.dataErrorLineHandler.handleNonExistantFile( fileObject );\n        }\n      } else {\n        throw new KettleException( \"Following required files are missing: \" + message );\n      }\n    }\n\n    List<FileObject> nonAccessibleFiles = data.getFiles().getNonAccessibleFiles();\n    if ( nonAccessibleFiles.size() != 0 ) {\n      String message = FileInputList.getRequiredFilesDescription( nonAccessibleFiles );\n      if ( log.isBasic() ) {\n        log.logBasic( \"Required files\", \"WARNING: Not accessible \" + message );\n      }\n      if ( meta.isErrorIgnored() ) {\n        for ( FileObject fileObject : nonAccessibleFiles ) {\n          data.dataErrorLineHandler.handleNonAccessibleFile( fileObject );\n        }\n      } else {\n        throw new KettleException( \"Following required files are not accessible: \" + message );\n      }\n    }\n  }\n\n  private boolean closeLastFile() {\n    try {\n      // Close previous file!\n      if ( data.filename != null ) {\n        // Increment the lines updated to reflect another file has been finished.\n        // This allows us to give a state of progress in the run time metrics\n        incrementLinesUpdated();\n        /*\n         * } else if ( sFileCompression != null && sFileCompression.equals( \"Snappy\" ) && data.sis != null ) {\n         * data.sis.close(); }\n         */\n        data.in.close();\n        data.isr.close();\n        data.filename = null; // send it down the next time.","sourceCodeStart":1289,"sourceCodeEnd":1325,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/textfileinput/TextFileInput.java#L1289-L1325","documentation":"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>'.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check and fix OS permissions (chmod/chown) or run the transformation under a user with read access.","Verify the storage location is mounted/online (ls the directory, test SFTP connectivity).","Ensure no other process holds an exclusive lock on the files; coordinate with the producer job.","Enable error-ignored handling for non-accessible files if partial processing is acceptable."],"exampleFix":"// before: files owned by appuser, transformation runs as kettleuser -> not accessible\n// after: grant read access\n//   chmod o+r /data/incoming/*.csv  (or add kettleuser to the file group)\n//   OR run the transformation as a user with the required permissions","handlingStrategy":"validation","validationCode":"// Verify read access to each input file before the transformation runs\nfor (String p : filePaths) {\n  Path path = Paths.get(p);\n  if (!Files.isReadable(path)) {\n    throw new AccessDeniedException(p); // fail fast with a clear message\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  initStep(inputFiles);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"not accessible\")) {\n    logError(\"Fix permissions/mounts: \" + e.getMessage());\n  }\n  throw e;\n}","preventionTips":["Run the PDI execution under an account with read access to all input locations","Check mount/permission health in a pre-flight job step","Coordinate with producers so files aren't read while locked or being written"],"tags":["permissions","file-access","initialization"],"backgroundTag":"permission-denied","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}