[ https://issues.apache.org/activemq/browse/CAMEL-3309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63162#action_63162 ]
Bengt Rodehav commented on CAMEL-3309: -------------------------------------- Somehow I had missed your last post about the wiki - just saw it... The documentation is very thorough(and good). However, the "stepwise" option is a bit confusing as I wrote in my last post. Like you say in the wiki, when stepwise=true, the directory is changed stepwise but when stepwise=false, the directory is not changed at all. If this were the only effect then the option should be called something like "changeDirectoryWhenListing" or "consumerChangeDirectory" (bad names but you get the idea). However, when producing files ("PUT"), the directory is changed (contrary to what the wiki says) but the stepwise option then controls whether it's done stepwise or in one go. In this respect the name of the option seems more correct than in the consumer case. I think we must use two different options rather than reusing the same option for two purposes. We need one option that controls whether or not to change directory in a consuming situation and another option that controls whether any change of directory should be done stepwise or not. Also, I think a little warning regarding the stepwise=true scenario is appropriate, e g: \\ \\ {code} Note that stepwise changing of directory will in most cases only work when the user is confined to it's home directory and when the home directory is reported as "/". {code} > Stepwise change of directory unfit for production (ftp/ftps/sftp) > ----------------------------------------------------------------- > > Key: CAMEL-3309 > URL: https://issues.apache.org/activemq/browse/CAMEL-3309 > Project: Apache Camel > Issue Type: Improvement > Components: camel-ftp > Affects Versions: 2.5.0 > Reporter: Bengt Rodehav > Assignee: Claus Ibsen > Fix For: 2.6.0 > > Attachments: camel-ftp.patch > > > In Camel 2.5, the logic for changing directory for ftp/ftps/sftp has changed > in order to fix the problems discussed in the following thread: > > http://camel.465427.n5.nabble.com/How-to-change-directory-while-using-sftp-component-td2806817.html#a2807611 > In Camel 2.5 changing of the remote directory is now done in a stepwise > manner. This is a strategy not fit for production since it assumes that the > logged in ftp/ftps/sftp user has access to all intermediate directories all > the way down to its home directory. This is rarely the case. > Also, when testing ftp/sftp on Serv-U, a Windows based ftp/ftps/sftp server, > it turns out that it reports the current directory in a "Windows way", e g > /C:/temp/servu/user/sample/file2sftp. The topmost folder is not "/" but > "/C:". This also breaks the new stepwise way of changing directory since it > always tries to change to "/" if an absolute path is used. > I propose to introduce a configuration property to enable/disable stepwise > changing of directories where disabling it should be the default. I will > upload a patch shortly. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.