You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Rajika Kumarasiri <ra...@wso2.com> on 2012/09/07 11:59:27 UTC
[VFS] FTPS problem
hello,
I am trying to use the FTPS(SSL over FTP) support in commons-vfs. I tried
to resolve a folder in proftpd ftp server(configured only to accept SSL for
control and data). I have the following simple code.
// start of source
FTPSTest ftpsTest = new FTPSTest();
StandardFileSystemManager fsm = ftpsTest.getFileSystemManager();
FileObject file =
fsm.resolveFile("ftps://ftpuser:user123@localhost/test");
FileObject[] children = file.getChildren();
// end of source
When I tried this FTPs client it fails with an error on server - SSL/TLS
required but absent on data channel, denying LIST command.
I did some debugging and USER, PASS, PORT command was
invoked successfully and user was able to log in. When tries to resolve the
folder it fails with the above error. As the error says it seems there is
no SSL/TLS connections from the client when trying to list the folder(when
I turn off SSL/TLS for data channel things worked as expected).
I looked at the org.apache.commons.vfs2.provider.ftps.FTPSClientFactory I
didn't see any place where the FTPSClient#setKeyManager/TrustManager is
used(although trust store manager is initiated). I was wondering if anybody
has got to work the FTPS support in commons-vfs. I have the SSL debug log
of the client side as well.
Rajika
Re: [VFS] FTPS problem
Posted by Gary Gregory <ga...@gmail.com>.
The FTPS unit test
org.apache.commons.vfs2.provider.ftps.test.FtpsProviderTestCase_Disabled
uses:
protected FileSystemOptions getFileSystemOptions()
{
if (fileSystemOptions == null)
{
fileSystemOptions = new FileSystemOptions();
final FtpsFileSystemConfigBuilder builder =
FtpsFileSystemConfigBuilder.getInstance();
builder.setPassiveMode(fileSystemOptions, true);
builder.setDataTimeout(fileSystemOptions,
Integer.valueOf(2000));
builder.setFtpsType(fileSystemOptions,
FtpsFileSystemConfigBuilder.FTPS_TYPE_IMPLICIT);
}
return fileSystemOptions;
}
This test is actually disabled due to a different issue, maybe in Commons
Net.
Gary
On Fri, Sep 7, 2012 at 5:59 AM, Rajika Kumarasiri <ra...@wso2.com> wrote:
> hello,
>
> I am trying to use the FTPS(SSL over FTP) support in commons-vfs. I tried
> to resolve a folder in proftpd ftp server(configured only to accept SSL for
> control and data). I have the following simple code.
>
> // start of source
>
> FTPSTest ftpsTest = new FTPSTest();
> StandardFileSystemManager fsm =
> ftpsTest.getFileSystemManager();
>
> FileObject file =
> fsm.resolveFile("ftps://ftpuser:user123@localhost/test");
>
> FileObject[] children = file.getChildren();
>
> // end of source
>
> When I tried this FTPs client it fails with an error on server - SSL/TLS
> required but absent on data channel, denying LIST command.
>
> I did some debugging and USER, PASS, PORT command was
> invoked successfully and user was able to log in. When tries to resolve the
> folder it fails with the above error. As the error says it seems there is
> no SSL/TLS connections from the client when trying to list the folder(when
> I turn off SSL/TLS for data channel things worked as expected).
>
> I looked at the org.apache.commons.vfs2.provider.ftps.FTPSClientFactory I
> didn't see any place where the FTPSClient#setKeyManager/TrustManager is
> used(although trust store manager is initiated). I was wondering if anybody
> has got to work the FTPS support in commons-vfs. I have the SSL debug log
> of the client side as well.
>
> Rajika
>
>
>
>
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: [VFS] FTPS problem
Posted by Rajika Kumarasiri <ra...@wso2.com>.
This email is not intend for this group. Please ignore.
Rajika
On Fri, Sep 7, 2012 at 3:29 PM, Rajika Kumarasiri <ra...@wso2.com> wrote:
> hello,
>
> I am trying to use the FTPS(SSL over FTP) support in commons-vfs. I tried
> to resolve a folder in proftpd ftp server(configured only to accept SSL for
> control and data). I have the following simple code.
>
> // start of source
>
> FTPSTest ftpsTest = new FTPSTest();
> StandardFileSystemManager fsm =
> ftpsTest.getFileSystemManager();
>
> FileObject file =
> fsm.resolveFile("ftps://ftpuser:user123@localhost/test");
>
> FileObject[] children = file.getChildren();
>
> // end of source
>
> When I tried this FTPs client it fails with an error on server - SSL/TLS
> required but absent on data channel, denying LIST command.
>
> I did some debugging and USER, PASS, PORT command was
> invoked successfully and user was able to log in. When tries to resolve the
> folder it fails with the above error. As the error says it seems there is
> no SSL/TLS connections from the client when trying to list the folder(when
> I turn off SSL/TLS for data channel things worked as expected).
>
> I looked at the org.apache.commons.vfs2.provider.ftps.FTPSClientFactory I
> didn't see any place where the FTPSClient#setKeyManager/TrustManager is
> used(although trust store manager is initiated). I was wondering if anybody
> has got to work the FTPS support in commons-vfs. I have the SSL debug log
> of the client side as well.
>
> Rajika
>
>
>
>
>
>