Questions tagged [ftp-client]

is for questions dealing with the clients used for the file transfer protocol.

FTP, or File Transfer Protocol, is a way of exchanging files over a network. It uses a client-server architecture with dual connections between them; one for control and one for data.

FTP Wikipedia Article

732 questions
9
votes
3 answers

Apache Commons NET: Should I create a new FTPClient object on each connection or reuse one?

I'm just wondering: in my Java application, each time I need to connect to an FTP server, should I create a new FTPClient object, or should I create one FTPClient() object and re-use that each time I connect to an FTP server?
AlexPriceAP
  • 1,987
  • 6
  • 26
  • 41
9
votes
1 answer

Monitoring progress using Apache Commons FTPClient

I have a simple FTPClient class that downloads files form an FTP server. I also need to monitor progress of the download, but I do not see a way how. The actually download files function is a simple function of (your ftp client…
9
votes
2 answers

How to properly disconnect from FTP server with FtpWebRequest

I've created a ftp client that connects several times during the day to retrieve log files from a FTP server. The Problem is that after a few hours I am getting an error message from the FTP server (-421 session limit reached..). When I check the…
user797717
  • 758
  • 1
  • 6
  • 18
9
votes
4 answers

Setting connect timeout for FtpClient

When using ftpClient.connect with an existing host who has no ftp service active, timeout occurs only after 5 minutes, which is much too long. I tried setting diverse timeouts (setDefaultTimeout, setDataTimeout) which did not change…
stracktracer
  • 1,862
  • 5
  • 24
  • 37
8
votes
3 answers

How to import org.apache.commons.net.ftp.FTPClient

In Eclipse, the following import... import org.apache.commons.net.ftp.FTPClient; ...produces the following error message... The import org.apache cannot be resolved I do not know how to import, nor where to download the import (if necessary). I…
Roger
  • 1,461
  • 5
  • 14
  • 15
8
votes
5 answers

Apache Commons FTPClient, check if remote directory exist and get permissions (linux - unix)

Is it possible with FTPClient (Apache commons-net) to check if a remote directory exists? I want to do something like this: ftp.isDirectory(String path) //returns true, false And then get permissions (chmod) of directory: ftp.getPermisions(String…
Xerg
  • 293
  • 2
  • 4
  • 10
8
votes
1 answer

org.apache.commons.net.ftp use different port

I want to connect to a FTP-Server via my Servlet and I know it works, but to use it on my virtual Server I need to change the Port the servlet connects to, because the FTP-Server doesn't use the standard port. My problem is, that I don't know how I…
Paixsn
  • 1,256
  • 3
  • 12
  • 22
8
votes
1 answer

"550 SSL/TLS required on the data channel" using Apache Commons FTPSClient

I have a probleme reading data with FTPClient on a FTP-Server (ProFTPD 1.3.3a) that requires encryption on the data channel. Everything works fine without encryption on an other server. My code is: FTPSClient ftpsClient = new FTPSClient("TLS",…
Randy
  • 1,299
  • 2
  • 10
  • 23
7
votes
2 answers

FTPClient corrupts the images while uploading to ftp server on android?

I'm trying to upload images to a FTP server (on my local PC) from Android Phone (HTC Desire HD). Images are going to FTP server but they are corrupted. And the method (ftpClient.storeFile()) throws IOException (Bad File Number) Please help me. This…
osman katib
  • 135
  • 1
  • 14
7
votes
1 answer

FTP file upload failure Java

I use Apache's FTPClient and FTPServer libraries in my Java project. Server and client are on the same machine. My FTPServer is supposed to be a local server,nothing related to the Internet. I can connect to the FTPServer from the client(I get 230…
toruko
  • 275
  • 1
  • 4
  • 11
7
votes
2 answers

Transfer files from android with FTPS to the server

I am using the Apache Commons FTP library in my android application I am making the connection through FTPS, and although it connects perfectly to the server, I have a problem when transferring files. The client who orders the app, for security…
Sergio76
  • 3,835
  • 16
  • 61
  • 88
7
votes
3 answers

GnuTLS error -110: The TLS connection was non-properly terminated

I observed that one of my Windows Services was not connecting to an FTP location on a Unix Server, I ran the executable on my PC as the dev didn't log any error and i was getting timeout error on trying to get response from an FTPWebRequest Object…
kolexinfos
  • 1,030
  • 1
  • 21
  • 42
7
votes
3 answers

Issue with org.apache.commons.net.ftp.FTPClient listFiles()

The listFiles() method of org.apache.commons.net.ftp.FTPClient works fine with Filezilla server on 127.0.0.1 but returns null on the root directory of public FTP servers such as belnet.be. There is an identical question on the link below but…
James P.
  • 19,313
  • 27
  • 97
  • 155
7
votes
3 answers

FTPClient.listFiles not working

I am trying to list all the files under a specific directory in a ftp server. FTPFile[] subFiles = ftpClient.listFiles("directory"); Although the directory is a valid one , but the code gets stuck while calling listFiles , what may be the reason. ?…
Raja
  • 305
  • 2
  • 4
  • 14
7
votes
2 answers

Properly check FTP server connection

I open a connection to an FTP server at the start of my program. Before I perform operations on the server I want to check if the connection was successfully established. The easiest fast manner so if the connection is gone, I will try to connect…
Michael A
  • 5,770
  • 16
  • 75
  • 127
1
2
3
48 49