You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "chandra shekhar pandey (JIRA)" <ji...@apache.org> on 2015/06/03 06:17:49 UTC

[jira] [Created] (CAMEL-8828) camel-ftp component does not support absoulte path.

chandra shekhar pandey created CAMEL-8828:
---------------------------------------------

             Summary: camel-ftp component does not support absoulte path.
                 Key: CAMEL-8828
                 URL: https://issues.apache.org/jira/browse/CAMEL-8828
             Project: Camel
          Issue Type: Bug
          Components: documentation
    Affects Versions: 2.12.3
         Environment: Linux, Windows
            Reporter: chandra shekhar pandey


- If a user uses absolute path in ftp component like
{code}
<route id="timerToLog1">
      <from uri="file:///path/to/input"/>
      <to uri="sftp://rider:secret@localhost:21000//absolute/path/to/dir?fileExist=Move&amp;moveExisting=${file:name}-${date:now:yyyyMMdd-HHmmssSSS}"/>
</route>
{code}
- User receives following error
{code}
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 ...
{code}
- 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.
- If people really want a ftp user to access some path outside the FTP folder, then use symlinks and so on.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)