Hello,
I use FTPClient. The connection to ftp works, but when i try to upload a file, i have a FTPException : access denied... I don't understand why the access is denied whereas i could connect !
This is my code (Test.java):
FTPClient.initSOCKS("1080","192.168.200.1");
FTPClient ftp = new FTPClient();
try {
ftp.setRemoteHost("172.16.7.137");
ftp.connect();
if (ftp.connected()) {
System.out.println("Connection succeeded");
ftp.login("test", "test");
System.out.println("Login succeeded");
ftp.setDetectTransferMode(true);
ftp.setConnectMode(FTPConnectMode.PASV);
ftp.put("test_file","test_file");
}
}
catch (Exception e) {
e.printStackTrace();
}
Ad this is my stacktrace :
Connection succeeded
Login succeeded
com.enterprisedt.net.ftp.FTPException: Access is denied.
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:977)
at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:2263)
at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:2322)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2065)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2047)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2025)
at Test.main(Test.java:17)
So can you help me ?