Reputation: 859
I use FTPClient
to automatically downloads files from FTP servers. I tested it with a mock FTP server, and everything works fine.
Now, my problem is that when I use the address of the servers from where I want to get the files, I get the following error:
java.io.IOException: Unable to determine system type - response: 530 Please login with USER and PASS.
at org.apache.commons.net.ftp.FTPClient.getSystemType(FTPClient.java:2835)
at org.apache.commons.net.ftp.FTPClient.createParser(FTPClient.java:3401)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3370)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:3048)
The servers are available without a password through a web browser. Why do I need one here? How do I get one?
Upvotes: 1
Views: 1207
Reputation: 202360
You almost always need username/password, when logging into FTP server. Some public FTP servers are happy with any username/password or something like anonymous
for the username and anything for the password. Web browsers do that automatically, so seemingly they do not use any credentials. With your code, you need to specify such credentials explicitly.
Upvotes: 2