Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-3352

[Doc] camel-ftp component does not support absolute path.

XMLWordPrintable

    • Icon: Documentation Documentation
    • Resolution: Done
    • Icon: Major Major
    • jboss-fuse-6.3
    • jboss-fuse-6.1
    • Camel
    • 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&amp;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.

            fbolton@redhat.com Fintan Bolton (Inactive)
            rhn-support-cpandey Chandra Shekhar Pandey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: