{"record":{"id":"4c94912cdebd081c","repo":"pentaho/pentaho-kettle","slug":"jobftps-error-changingfolder","errorCode":"JobFTPS.Error.ChangingFolder","errorMessage":"JobFTPS.Error.ChangingFolder","messagePattern":"JobFTPS\\.Error\\.ChangingFolder","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java","lineNumber":394,"sourceCode":"          replies.add( e );\n        }\n      }\n    }\n  }\n\n  /**\n   *\n   * this method change FTP working directory\n   *\n   * @param directory\n   *          change the working directory\n   * @throws KettleException\n   */\n  public void changeDirectory( String directory ) throws KettleException {\n    try {\n      this.connection.changeDirectory( directory );\n    } catch ( Exception f ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobFTPS.Error.ChangingFolder\", directory ), f );\n    }\n  }\n\n  /**\n   *\n   * this method is used to create a directory in remote host\n   *\n   * @param directory\n   *          directory name on remote host\n   * @throws KettleException\n   */\n  public void createDirectory( String directory ) throws KettleException {\n    try {\n      this.connection.makeDirectory( directory );\n    } catch ( Exception f ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobFTPS.Error.CreationFolder\", directory ), f );\n    }\n  }","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java#L376-L412","documentation":"FTPSConnection.changeDirectory(dir) delegates to the underlying FTPS client's changeDirectory. Any exception is wrapped in KettleException with localized message JobFTPS.Error.ChangingFolder naming the directory, signaling the remote working directory could not be changed.","triggerScenarios":"Called from buildFTPSConnection or execute() with a directory path that does not exist on the server, is not accessible with the current credentials, or when the control connection has dropped.","commonSituations":"Typo in the remote folder path; folder deleted or renamed between runs; insufficient permissions for the FTPS user; server closed idle connection before the CWD command.","solutions":["Verify the remote directory path exists (list the parent folder first)","Check the FTPS user's permissions on that directory","Inspect the wrapped cause `f` for the server reply code (e.g. 550)","Reconnect (buildFTPSConnection) if the session went stale before changing directory"],"exampleFix":"// before\nftpConnection.changeDirectory( \"/data/outbox\" );\n// after\nif ( !ftpConnection.folderExists( \"/data/outbox\" ) ) {\n  logError( \"Remote folder missing: /data/outbox\" );\n  return;\n}\nftpConnection.changeDirectory( \"/data/outbox\" );","handlingStrategy":"try-catch","validationCode":"// verify remote dir exists before changing into it\nif ( !ftpsConnection.folderExists( directory ) ) {\n  throw new KettleException( \"Remote folder does not exist: \" + directory );\n}","typeGuard":null,"tryCatchPattern":"try { ftpsConnection.changeDirectory( directory ); }\ncatch ( KettleException ke ) {\n  log.error( \"Cannot change to \" + directory + \": \" + ke.getCause() );\n  ftpsConnection.connect(); // reconnect on stale sessions, then retry once\n}","preventionTips":["Confirm remote paths exist and are spelled correctly before runs","Check FTPS user permissions on target directories","Reconnect on idle timeouts before issuing CWD"],"tags":["ftps","remote-directory","network","job-entry"],"backgroundTag":"resource-not-found","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"}