:oops: Hi,
I am getting the following error when i am uploading a file to ftp.
Setting remote host
Connecting to server ftp.sajix.com
Connected and logged in to server ftp.sajix.com
com.enterprisedt.net.ftp.FTPException: /sajix/temp: Access is denied.
My code is as follows
try {
// create client
System.out.println("the Value of the Connection");
ftp = new FileTransferClient();
// set remote host
System.out.println("Setting remote host");
ftp.setRemoteHost(host);
ftp.setUserName(username);
ftp.setPassword(password);
// connect to the server
System.out.println("Connecting to server " + host);
ftp.connect();
System.out.println("Connected and logged in to server " + host);
ftp.setContentType(FTPTransferType.ASCII);
ftp.uploadFile(filename, "/sajix");
System.out.println("Finished Uploading File");
ftp.disconnect();
} catch (Exception e) {
System.out.println(e);
}
I am using Netbeans 6.5,J2EE 5.0,Tomcat 6.0.18
please help me out of this problem.
I tried SFTP , it worked fine.