[ 
https://issues.apache.org/activemq/browse/CAMEL-3309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63147#action_63147
 ] 

Claus Ibsen commented on CAMEL-3309:
------------------------------------

I ran the last test (from above) using Camel 2.4.0.

FileZilla logs
{code}
(000005)07/11/2010 10:13:03 - (not logged in) (127.0.0.1)> Connected, sending 
welcome message...
(000005)07/11/2010 10:13:03 - (not logged in) (127.0.0.1)> 220-FileZilla Server 
version 0.9.37 beta
(000005)07/11/2010 10:13:03 - (not logged in) (127.0.0.1)> 220-written by Tim 
Kosse (tim.ko...@gmx.de)
(000005)07/11/2010 10:13:03 - (not logged in) (127.0.0.1)> 220 Please visit 
http://sourceforge.net/projects/filezilla/
(000005)07/11/2010 10:13:03 - (not logged in) (127.0.0.1)> USER camel
(000005)07/11/2010 10:13:03 - (not logged in) (127.0.0.1)> 331 Password 
required for camel
(000005)07/11/2010 10:13:03 - (not logged in) (127.0.0.1)> PASS *****
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 230 Logged on
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> TYPE A
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 200 Type set to A
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> SYST
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 215 UNIX emulated by FileZilla
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> PORT 127,0,0,1,4,122
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 200 Port command successful
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> LIST one/two
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 150 Opening data channel for 
directory list.
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 226 Transfer OK
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> PORT 127,0,0,1,4,123
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 200 Port command successful
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> LIST one/two/sub-a
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 150 Opening data channel for 
directory list.
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 226 Transfer OK
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> PORT 127,0,0,1,4,124
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 200 Port command successful
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> LIST one/two/sub-b
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 150 Opening data channel for 
directory list.
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 226 Transfer OK
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> PORT 127,0,0,1,4,125
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 200 Port command successful
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> RETR one/two/foo.txt
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 150 Opening data channel for 
file transfer.
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 226 Transfer OK
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> PORT 127,0,0,1,4,126
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 200 Port command successful
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> RETR one/two/sub-a/a.txt
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 150 Opening data channel for 
file transfer.
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 226 Transfer OK
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> PORT 127,0,0,1,4,127
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 200 Port command successful
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> RETR one/two/sub-b/b.txt
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 150 Opening data channel for 
file transfer.
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 226 Transfer OK
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> QUIT
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> 221 Goodbye
(000005)07/11/2010 10:13:03 - camel (127.0.0.1)> disconnected.
{code}

As you can see Camel 2.4.0 does not use any CD command at all.
However as said some FTP servers doesn't handle this. For example they can't 
even do a LIST xxx where xxx is directory name.

Bengt I suspect in your case you connect to some partner servers using SFTP, 
and those servers are likely mainframes AS/400 z/os as the likes.
And they may not have setup FTP in a sensible way. So when you login you are 
not confined to an user directory. And they may not use symbolic links to let 
you
the ftp user traverse directories which are physically outside the FTP home 
structure.

To support your kind of use-cases, we would have to incorporate both ways
- as in 2.4.0
- the new way using CD



> 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.

Reply via email to