[ https://issues.apache.org/activemq/browse/CAMEL-3309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63148#action_63148 ]
Bengt Rodehav commented on CAMEL-3309: -------------------------------------- Yes the Camel 2.4 way will work for me. However, as I've said before, the problem is not about changing the directory or not. I haven't found a case where changing the directory leads to any problems. It's how Camel changes the directory that is the problem. Changing the directory stepwise will only work when a user is confined to the home directory AND the ftp server reports the home directory as root. I've done a whole lot of ftp'ing in my days and I can assure you that lots of real world ftp servers will be inaccessible if this technique is used. Since changing the directory is not a known problem I think it's better to stay with changing the directory (since that solves a number of problems that you described) but not necessarily in a stepwise manner. If not, then there is no way to support servers that require you to be in the current directory in order to list files but that do not work with the stepwise changing of directories. Complete flexibility would of course be the best. Then you would have on option, similar to the one in my patch, that allows to enable/disable stepwise changing of directory as well as another option that allows you to enable/disable whether to change directory at all. My suggestion for defaults would be to change directory but not in a stepwise manner. Did you have a chance to do the recursive tests with the "tempFileName" option? It seems to me that this is a bug regarding recursive that is unrelated to this isssue. If you can verify my results then we should create a JIRA ticket for it. > 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 > 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.