2017-08-03 3 views
0

のための権限拒否をスローします。しかしそれを読んでいる間にラクダはcom.jcraft.jsch.SftpException: Permission deniedを投げる。しかし、私はその中のフォルダとファイルに対する読み書き権限を持っています。私はfilezillaで.doneフォルダにファイルを移動しようとしました。Apacheのキャメルは、私はSFTPサーバからファイルを読み込む必要がSFTP接続

ルート:

sftp://[email protected]_ADDRESS:PORT/path?password=MY_PASSWORD&move=.done&binary=true&disconnect=true&include=FILENAME_(2\\d{3})(\\d{2})(\\d{2}).txt 

File Permissions

STACKTRACE

o.a.c.c.file.remote.SftpConsumer   : Error processing file RemoteFile[FILENAME_20170802.txt] due to Cannot retrieve file: path/FILENAME_20170802.txt. Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Cannot retrieve file: path/FILENAME_20170802.txt] 

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot retrieve file: path/FILENAME_20170802.txt 
    at org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:704) ~[camel-ftp-2.19.1.jar:2.19.1] 
    at org.apache.camel.component.file.remote.SftpOperations.retrieveFile(SftpOperations.java:648) ~[camel-ftp-2.19.1.jar:2.19.1] 
    at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:408) [camel-core-2.19.1.jar:2.19.1] 
    at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:137) [camel-ftp-2.19.1.jar:2.19.1] 
    at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:218) [camel-core-2.19.1.jar:2.19.1] 
    at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:182) [camel-core-2.19.1.jar:2.19.1] 
    at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174) [camel-core-2.19.1.jar:2.19.1] 
    at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101) [camel-core-2.19.1.jar:2.19.1] 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_131] 
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_131] 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_131] 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_131] 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131] 
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131] 
Caused by: com.jcraft.jsch.SftpException: Permission denied 
    at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873) ~[jsch-0.1.54.jar:na] 
    at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225) ~[jsch-0.1.54.jar:na] 
    at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1318) ~[jsch-0.1.54.jar:na] 
    at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1290) ~[jsch-0.1.54.jar:na] 
    at org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:689) ~[camel-ftp-2.19.1.jar:2.19.1] 
    ... 14 common frames omitted 
+0

。それは確かに許可関連の問題だろう。どのように資格情報を渡しているか確認してください。実際に提供された証明書には、これらの権利があります。 FTPサーバーに接続するために使用されるcamel ftp構文を確認します。フォルダが存在し、フォルダパスがラクダの経路(すなわち、構文)に正しく記載されている場合 – sakura

+0

チェック./doneを試してみてください。さらに、ソースファイル 'FILENAME.txt'が存在することを確認してください。あなたはFilenameに関連したいくつかのパターンを持っていますが、Filenameの名前には何も表示されません。 – sakura

+0

@sakura更新されたファイル名。ファイルはSFTPに存在し、正しいパスから正しいファイル名も印刷します。 SFTPでは、指定された信任状にファイルの読み取りと書き込みの許可が与えられます(filezillaでチェックされます)。しかし、私はこのエラー – Ibrahim

答えて

0

あなたが提供したディレクトリ・パスは、絶対、相対的ではありません。 これが問題かどうかを確認するだけです。

デフォルトでは、キャメル/ホーム/ {ユーザー名} /ディレクトリに移動します。 "\"ルートディレクトリではありません。

希望します。ラクダ投げている許可が拒否された場合

関連する問題