在windows上服务器安装ftp模块,可供平时ftp用。在往一台redhat7.4服务器上传一个jdk包时,解压时报错。查询资料是因为上传文件是使用了ACSII格式去传输文件,导致文件损坏。(可以通过MD5的值去判断两个文件是否为同一文件,文件是否有损坏。)下面是操作步骤和相关报错。
[test@localhost bea]$ ftp 10.10.10.11
Connected to 10.10.10.11 (10.10.10.11).
220 Microsoft FTP Service
Name (10.10.10.11:test): zhongjianjian
331 Password required for zhongjianjian.
Password:
230 User logged in.
Remote system type is Windows_NT.
ftp> get jdk-6u201-linux-x64.bin
local: jdk-6u201-linux-x64.bin remote: jdk-6u201-linux-x64.bin
227 Entering Passive Mode (10,10,10,11,236,128).
125 Data connection already open; Transfer starting.
WARNING! 219752 bare linefeeds received in ASCII mode
File may not have transferred correctly.
226 Transfer complete.
58712696 bytes received in 1.34 secs (43676.04 Kbytes/sec)
ftp> by
221 Goodbye.
[test@localhost165 bea]$ ll
total 311548
-rwxr-xr-x 1 root root 201466748 Apr 24 17:44 20190424001.zip
-rw-r--r-- 1 test test 58705516 Aug 29 10:50 install.sfx.32558
-rw-rw-r-- 1 test test 122069 Feb 28 11:22 javax.persistence_1.0.0.0_2-0-0.jar
drwxr-xr-x 7 test test 4096 Jun 24 2018 jdk1.6.0_201
drwxr-xr-x 8 test test 4096 Mar 27 2013 jdk1.6.0_45
-rw-rw-r-- 1 test test 58709743 Aug 29 10:56 jdk-6u201-linux-x64.bin
drwxrwxr-x 11 test test 4096 Nov 22 2018 wls1036
[test@localhost bea]$ chmod 740 jdk-6u201-linux-x64.bin
[test@localhost bea]$ ./jdk-6u201-linux-x64.bin
Unpacking...
Checksumming...
The download file appears to be corrupted. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.
Please do not attempt to install this archive file.
================================================
解决方法:
[test@localhost bea]$ ftp 10.10.10.11
Connected to 10.10.10.11 (10.10.10.11).
220 Microsoft FTP Service
Name (10.10.10.11:test): zhongjianjian
331 Password required for zhongjianjian.
Password:
230 User logged in.
Remote system type is Windows_NT.
ftp> binary
200 Type set to I.
ftp> get jdk-6u201-linux-x64.bin
local: jdk-6u201-linux-x64.bin remote: jdk-6u201-linux-x64.bin
227 Entering Passive Mode (10,150,129,103,238,252).
125 Data connection already open; Transfer starting.
226 Transfer complete.
58712696 bytes received in 0.886 secs (66232.92 Kbytes/sec)