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

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

     [ https://issues.apache.org/jira/browse/CAMEL-8828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-8828.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 2.16.0
         Assignee: Claus Ibsen

Thanks I have updated the docs with a box saying absolute paths is not supported.

> camel-ftp component does not support absolute path.
> ---------------------------------------------------
>
>                 Key: CAMEL-8828
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8828
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-ftp, documentation
>         Environment: Linux, Windows
>            Reporter: chandra shekhar pandey
>            Assignee: Claus Ibsen
>             Fix For: 2.16.0
>
>
> - 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.
> - 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 absolute path is not recommended when using camel-ftp component.*



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