0
Unix/Mac/LinuxからWindows FTPサーバにファイルを転送する際に問題があります。Apache FTPSクライアントstore UNIX/Linux/MaxからのFTPSサーバのファイル
同じjavaコードはwindows pcから動作しますが、私のWindowsマシン上で、私はそれらを必要とするdidntの間、*ニックス/マックからこれだけで働いていた転送はFTPセッションに
set ftps:initial-prot
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ssl:verify-certificate no
コマンド - 私はそれがシステム変数に関連すると仮定します。
これは、FTPS Apacheのクラスでは、このパラメータに相当しますどのような私のJavaコード
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();
}
のですか?
set ftps:initial-prot
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ssl:verify-certificate no
1):初期prot'とその他?これらの 'lftp'コマンドはありますか?私たちに推測させないでください!教えて! 2)Macと* nixでコードは何をしていますか?教えて!正確なエラーメッセージ、ログファイル、何か! –