[ https://issues.apache.org/jira/browse/CAMEL-15544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17197730#comment-17197730 ]
Jan Bednar commented on CAMEL-15544: ------------------------------------ Option jailStartingDirectory is true by default, preventing you from writing outside of starting path. Please test with `jailStartingDirectory=false` and if it works, please close this PR as this is desirable behavior. > Using parameter tempFileName or tempPrefix with relative location in parent > directory will fail > ----------------------------------------------------------------------------------------------- > > Key: CAMEL-15544 > URL: https://issues.apache.org/jira/browse/CAMEL-15544 > Project: Camel > Issue Type: Improvement > Components: camel-ftp > Affects Versions: 3.5.0, 3.6.0 > Reporter: Oliver Limberg > Priority: Major > > When using either parameter tempFileName or tempPrefix with a relative path, > the component will not create the final target directory and moving/renaming > the file from the temp location will fail. > Both tests below will fail when placing them in FtpProducerTempPrefixTest > {code:java} > @Test > public void testWriteUsingRelativeTempPrefix() throws Exception { > sendFile("ftp://admin@localhost:" + getPort() + > "/upload/user/claus?binary=false&password=admin" + "&tempPrefix=../tmp/tmp_", > "Hello World", "claus.txt"); > Thread.sleep(500); > File file = new File(FTP_ROOT_DIR + "/upload/user/claus/claus.txt"); > assertTrue(file.exists(), "The uploaded file should exists"); > assertEquals("Hello World", IOConverter.toString(file, null)); > } > @Test > public void testWriteUsingRelativeTempFileName() throws Exception { > sendFile("ftp://admin@localhost:" + getPort() + > "/upload/user/claus?binary=false&password=admin" + > "&tempFileName=../tmp/${file:name.noext}.tmp", "Hello World", "claus.txt"); > Thread.sleep(500); > File file = new File(FTP_ROOT_DIR + "/upload/user/claus/claus.txt"); > assertTrue(file.exists(), "The uploaded file should exists"); > assertEquals("Hello World", IOConverter.toString(file, null)); > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)