gpt4 book ai didi

java - Camel FTPS组件自动创建目录

转载 作者:太空宇宙 更新时间:2023-11-04 13:10:09 24 4
gpt4 key购买 nike

我正在使用 Camel FTP 组件 (FTPS) 连接到 IBM iSeries,其日志中充满了以下语句:

EXPUSER 拒绝/LONDON 类型 *IFS。函数 CRT_DIR。 IP地址

我知道被拒绝是因为用户没有创建目录的权限,但是我怎样才能完全阻止这种情况发生呢?我可以添加一个选项来完全阻止这种情况发生,因为我不需要创建目录。

当前出发路线是

from(ftps://user@10.140.5.58:990//london/luprocess/to_embargo?password=password
&binary=true&move=.done&siteCommand=NAMEFMT 1&isImplicit=true&passiveMode=true
&timeout=10000&ftpClient.keyStore.file=C:/keys/key.jks
&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password)
.to(file://C:/messageOut);

最佳答案

如果源轮询文件夹已经退出,Camel 将不会创建它们。这是默认行为。我认为camel用户没有权限在源文件夹内创建目录.done。或者路径不正确,因此它尝试创建丢失的文件夹。

编辑:Camel 文档是这样说的:

For Camel versions before Camel 2.16, the directoryName must exist already as this component does not support the autoCreate option (which the file component does). The reason is that its the FTP administrator (FTP server) task to properly setup user accounts, and home directories with the right file permissions etc.

For Camel 2.16, autoCreate option is supported. When consumer starts, before polling is scheduled, there's additional FTP operation performed to create the directory configured for endpoint. The default value for autoCreate is true.

因此,如果您使用的版本低于 2.16,它不会为您创建该目录。如果您使用的是 2.16 版本,请设置 autoCreate=false。

顺便说一下,你的路径中有一个双斜杠。

10.140.5.58:990//london

在文档中是单斜杠。

10.140.5.58:990/london

关于java - Camel FTPS组件自动创建目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34047367/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com