You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bernd Eckenfels (JIRA)" <ji...@apache.org> on 2017/01/02 21:30:58 UTC

[jira] [Commented] (NET-607) Apache FTPS Client 3.3 storeFile to windows FTPS server from Unix/Linux/Max issue

    [ https://issues.apache.org/jira/browse/NET-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15793529#comment-15793529 ] 

Bernd Eckenfels commented on NET-607:
-------------------------------------

This is not a complete bug Report, can you please add the reason why you think this is a bug?

It Looks more like a request for Support, this is better done on the user@commons Mailing list. You should also add the actual error message you are seeing and the Kind of product (FTP Server Software and Version) you want to communicate with.

It is also not quit clear what the "set commands" mean, is this config from the FTP Server?

Anyway, the most likely Problem that it works on one machine and not the other (if you use the same Java Version) might be trusted certificates. This would be visible in the error message. Please also let us know which Java method fails first.

Please specify your JRE versions in use.

> Apache FTPS Client 3.3 storeFile to windows FTPS server from Unix/Linux/Max issue
> ---------------------------------------------------------------------------------
>
>                 Key: NET-607
>                 URL: https://issues.apache.org/jira/browse/NET-607
>             Project: Commons Net
>          Issue Type: Bug
>            Reporter: Barak Kedem
>            Priority: Minor
>
> i have an issue transferring files to Windows FTP server from Unix/Mac/Linux env.
> while the exact same java code works from windows pc. from *Nix/Mac the transfer only worked with this commands on the ftp session
> {code}
> set ftps:initial-prot 
> set ftp:ssl-force true
> set ftp:ssl-protect-data true
> set ssl:verify-certificate no
> {code}
> while on my windows machine i didnt need them - i assume it relates to system variable.
> This is my java code
> {code}
> protected FTPClient getClient(DeliveryDetails details) {
>     return new FTPSClient(false); // the connection is Explicit
> }
> public void setClient(FTPClient client, DeliveryDetails details) throws Exception {
>     client.setConnectTimeout(10000);
>     client.setDefaultTimeout(1000 * 60 * 2);
>     client.setControlKeepAliveTimeout(300);
>     client.setDataTimeout(15000);
>     client.connect(ftpDetails.host, ftpDetails.port);
>     client.setBufferSize(1024 * 1024);
>     client.login(ftpDetails.username, ftpDetails.getSensitiveData());
>     client.setControlEncoding("UTF-8");
>     client.setFileType(FTP.BINARY_FILE_TYPE);
>     client.setFileTransferMode(FTP.BLOCK_TRANSFER_MODE);
>     FTPSClient ftpsClient = (FTPSClient) client;
>     ftpsClient.execPBSZ(0);
>     ftpsClient.execPROT("P");
>     // both with it and without it didnt work ftpsClient.setWantClientAuth(false);
> }
> public void saveToServer(FTPClient client, File fileName, InputStream stream){
>     BufferedInputStream bis = new BufferedInputStream(stream);
>     boolean isSaved = client.storeFile(filename, bis);
>     client.logout();
> }
> {code}
> ‌What is equivalent of this parameters in the FTPS Apache class ?
> {code}
> set ftps:initial-prot 
> set ftp:ssl-force true
> set ftp:ssl-protect-data true
> set ssl:verify-certificate no
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)