大家好,我在我的电脑上安装了 filezilla ftp 服务器。我正在尝试在 android 应用程序上上传文件。但是,我收到错误 550(未找到目录)和错误 501(语法错误)。我在互联网上进行了一些搜索,但没有找到解决方案。请你帮助我好吗?这也是 FileZilla 界面上的日志:
(000001)14.08.2012 14:36:07 - (not logged in) (192.168.10.179)> Connected, sending welcome message...
(000001)14.08.2012 14:36:07 - (not logged in) (192.168.10.179)> 220 FTP server' a hoşgeldiniz.
(000001)14.08.2012 14:36:07 - (not logged in) (192.168.10.179)> USER users
(000001)14.08.2012 14:36:07 - (not logged in) (192.168.10.179)> 331 Password required for users
(000001)14.08.2012 14:36:07 - (not logged in) (192.168.10.179)> PASS *******
(000001)14.08.2012 14:36:07 - users (192.168.10.179)> 230 Logged on
(000001)14.08.2012 14:36:07 - users (192.168.10.179)> CWD murat.alemdagtp
(000001)14.08.2012 14:36:07 - users (192.168.10.179)> 550 CWD failed. "/murat.alemdagtp": directory not found.
(000001)14.08.2012 14:36:07 - users (192.168.10.179)> TYPE I
(000001)14.08.2012 14:36:07 - users (192.168.10.179)> 200 Type set to I
(000001)14.08.2012 14:36:08 - users (192.168.10.179)> PASV
(000001)14.08.2012 14:36:08 - users (192.168.10.179)> 227 Entering Passive Mode (192,168,10,179,9,71)
(000001)14.08.2012 14:36:08 - users (192.168.10.179)> STOR
(000001)14.08.2012 14:36:08 - users (192.168.10.179)> 501 Syntax error
(000001)14.08.2012 14:36:09 - users (192.168.10.179)> QUIT
(000001)14.08.2012 14:36:09 - users (192.168.10.179)> 221 Goodbye
(000001)14.08.2012 14:36:09 - users (192.168.10.179)> disconnected.
这是我的上传代码:
public Void doInBackground(Object... arg0)
{
String server = "192.168.10.179";
// TODO Auto-generated method stub
try
{
ftpClient.connect(server,21);
ftpClient.login("users", "1234567");
ftpClient.changeWorkingDirectory("murat.alemdag\ftp");
ftpClient.enterLocalPassiveMode();
FileInputStream in=new FileInputStream(file);
ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
ftpClient.storeFile(filename, in);
publishProgress(100);
ftpClient.logout();
}
catch (Exception ex)
{
ex.printStackTrace();
}
return null;
}//end of doInBackground method