在确定路径和文件名没有中文的情况下添加以下代码
ftp.setFileTransferMode(ftp.BINARY_FILE_TYPE);
ftp.enterLocalPassiveMode();//Switch to passive mode
Store = ftp.storeFile(destinationfile, in);
in.close();
如果仍返回false
getsebool -a | grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off
ftpd_connect_db --> off
ftpd_use_passive_mode --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
执行上面命令,再返回的结果看到两行都是off,代表,没有开启外网的访问