-
Documentation
-
Resolution: Done
-
Major
-
jboss-fuse-6.1
-
None
-
%
- If a user uses absolute path in ftp component like
<route id="timerToLog1"> <from uri="file:///path/to/input"/> <to uri="sftp://rider:secret@localhost:21000//absolute/path/to/dir?fileExist=Move&moveExisting=${file:name}-${date:now:yyyyMMdd-HHmmssSSS}"/> </route>
- User receives following error
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot rename file from: /absolute/path/to/dir/filename.ext to: absolute/path/to/dir/filename-20150602-103603722.ext at org.apache.camel.component.file.remote.SftpOperations.renameFile(SftpOperations.java:397)[284:org.apache.camel.camel-ftp:2.12.0.redhat-610379] at org.apache.camel.component.file.remote.SftpOperations.doMoveExistingFile(SftpOperations.java:909)[284:org.apache.camel.camel-ftp:2.12.0.redhat-610379] at org.apache.camel.component.file.remote.SftpOperations.doStoreFile(SftpOperations.java:811)[284:org.apache.camel.camel-ftp:2.12.0.redhat-610379] at org.apache.camel.component.file.remote.SftpOperations.storeFile(SftpOperations.java:784)[284:org.apache.camel.camel-ftp:2.12.0.redhat-610379] at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:278)[280:org.apache.camel.camel-core:2.12.0.redhat-610379] at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:166)[280:org.apache.camel.camel-core:2.12.0.redhat-610379] at org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)[284:org.apache.camel.camel-ftp:2.12.0.redhat-610379] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[280:org.apache.camel.camel-core:2.12.0.redhat-610379] at ...
- After discussion with camel experts, It is confirmed that only relative path are supported in camel-ftp components. As earlier there was support for absolute but it caused too much problems for some people with something working and not working. Also its not a good security model to allow absolute file access over FTP.
- But this is not documented with http://camel.apache.org/ftp2.html. This would be helpful for users.
- If people really want a ftp user to access some path outside the FTP folder, then use symlinks and so on.
- It is expected that document should cleary say that absoulte path is not recommended when using camel-ftp component.
- is related to
-
ENTESB-3250 In camel-sftp component if folder path is set with double slash (//) than exception thrown is misleading user.
- Closed
- is caused by
-
CAMEL-8828 Loading...