Software Version 7 1
(Contents) Chapter 1: 5 FTP? 5 FTP 5 7 6 6 6 FTP 7 95, 98, 2000, ME, NT 8 8 9 10 Ipswitch WS_FTP 11 WS_FTP Server 11 Development Kit 11 11 12 12 Chapter 2 : 13 13 14 14 15 17 Anonymous 17 18 Chapter 3 : 19 19 19 (Drag and Drop) 19 20 20 20 20 Passive 21 Chapter 4 : 22 22 23 24 UNIX 24 25 Chapter 5 : 27 27 27 27 28 28 Chapter 6 : WS_FTP 29? 29 29 29 30 30 Chapter 7 : SSL 31 SSL? 31 SSL 32 2
33 33 34 35 35 36 36 36 Chapter 8 : 38 38 38 39 39 40 Chapter 9 : 42 42 43 43 43 44 44 45 Chapter 10 : 46 46 47 47 47 47 48 Chapter 11 : 49 49 50 50 50 Chapter 12 : 53 53 53 54 55 Chapter 13 : 57 57 57 58 58 59 59 59 59 60 60 60 60 61 MS_DOS 61 61 62 62 63 63 3
64 64 Appendix A : FireScript 66 FireScript? 66 FireScript 66 fwsc 67 Comment 68 Script 68 68 FireScript 69 FireScript 69 71 72 FireScript 72 Switch 72 Case 73 Case 73 Continue 75 Jump Label 75 Return 75 Autodetect 75 SSL 76 FireScript 76 FireScript 77 FireScript 77 FireScript 77 FireScript 77 Appendix B: 78 Blocking call canceled 78 Cannot create file 79 Can t get xxx host entry 79 Can t set guest privileges 79 Connection refused 79 Directory identifier unavailable 79 Disk quota exceeded 80 Failed data channel 80 File too large to download 80 Illegal port command 80 Invalid page fault 80 Logon failure; Quitting 80 MDTM 80 Port command failed 81 User access denied 81 4
Chapter 1: File Transper Protocol,,,, Ipswitch, Inc FTP? FTP,, FTP FTP (File Transfer Protocol) ( ) FTP World Wide Web (HTTP ) PC PC 10, PC, ISP(Internet Service Provider) FTP File Transfer protocol - : (FTP ) PC FTP FTP PC LAN FTP FTP, FTP FTP 5
FTP B 7 ( ),,,, URL FTP WS_FTP : 386, 486, 95, 98, 2000, ME, NT 402 ( ),, 6
: 1 (ftpproecexe) 2 CD-ROM WS_FTP : 1 ( ) 2 CD-ROM CD-ROM 3 CD-ROM 4 CD-ROM autorun d:autorun 5 whatsnewtxt relnotestxt Note Note FTP FTP FTP FTP FTP ID ID 7
FTP Anonymous : FTP Anonymous Anonymous PC ( /pub /apps ) ( ) Anonymous FTP readme, readmetxt, index, 00index,, FTP Account Account,,, Anonymous Account Account, ID, 95, 98, 2000, ME, NT PC( ) FTP ( ) PC, FTP 8
PC FTP FTP 9
FTP URL WS_FTP Pro URL(Uniform Resource Locator), Ipswitch Web URL http://wwwipswitchcom/ FTP ftp://ftpipswitchcom FTP URL FTP URL URL ftpipswitchcom FTP URL ftpipswitchcom/french/ftp605ftxt WS_FTP Pro URL ftp://ftpipswitchcom/french ( ) URL Note Netscape 6 1 2 Netscape Navigator FTP URL 3 Microsoft Internet Explorer FTP URL 4 FTP URL 10
Ipswitch WS_FTP WS_FTP Server Developmetn kit wwwipswitchcom WS_FTP Server WS_FTP Server NT/2000 (SSL ) FTP WS_FTP Server PC FTP WS_FTP Server Development Kit Development Kit FTP FTP FTP Ipswitch wwwipswitchcom Ipswitch FTP : 1 2 Ipswitch Patches 3 4 ; 3 wsftp606exe 606 (, wsftp606txt) 5 11
Ipswitch FTP : 1 http://wwwipswitchcom 2 Service & Support 3 Patches and Upgrades 4 5 feedback@ipswitchcom PC : 1 2 3 WS_FTP _ Alt _, Alt+C FTP Alt+X 12
Chapter 2 : How to FTP 1 2 3 4 IP FTP 5 6 ID 7 ( ) 8 9 13
+ ( ) (IP) FTP, superservipsiwtchcom 123124125126 IP FTP IP ID FTP Account Account 14
Anonymous Account FTP, VM/CMS Account Account Anonymous Anonymous Anonymous Anonymous Account Account Account FTP Chapter 12 : Passive FTP PC( ) passive PC Passive passive Passive (SSL) SSL SSL Chapter 7 : SSL FTP PC (, C:\) WS_FTP 15
FTP ( ) FTP ( ) FTP 10 How to 1 2 3 4 16
5 1 2 3 4 Chapter 6 : WS_FTP WS_FTP WS_FTP,,,, Anonymous FTP ID FTP ID Anonymous, ; Anonymous ( Ipswitch FTP Anonymous 17
) Anonymous FTP ; Anonymous PC guest Anonymous,, Anonymous ( ) 18
Chapter 3 :, ( ) FTP ( ) Passive Ctrl (Drag and Drop) Ctrl More Info 19
Note FTP,, Chapter 6 : WS_FTP ASCII, Binary,, HTML,, ASCII (txt, html, htm, cgi) EBCDIC ASCII binary ASCII Ascii 20
,, (bmp, jpg, exe, zip) binary Binary ( binary ) Binary, ASCII, Binary Passive FTP PC FTP Passive PC Passive Passive FTP Passive Passive failed data channel 21
Chapter 4 : : WS_FTP FTP 5 (FTP ) 22
( ) ( ) ( d:),, PC FTP / ( FTP ; create Account ) 23
FTP, Temp PC FTP ( ) WS_FTP FTP,,,,, FTP UNIX FTP UNIX 1 FTP, CHMOD(UNIX) 2 : 3 4 ( ) 3 24
Note Note 3 4 ; 1644 : 1 (UNIX sticky bit ), save-text 2 ID 4 ID 4,, ISP 3 3 UNIX 10,, 4 2nd, 3nd, 4th None 0 --- Execute 1 --x Write 2 -w- Write, Execute 3 -wx Read 4 r-- Read, Execute 5 r-x Read, Write 6 rw- Read, Write, Execute 7 Rwx 25
(-,s,s,t) (d) 2 10,,, 751 drwxr-x- -x 4 d rwx r-x --x 2-4 5-7 8-10 (-,s,s,t) : :read :execute read, write, execute execute 26
Chapter 5 : 70 Microsoft FTP : 1 27
2 3 4 FTP : 1 2 3 4 (Ctrl ) 5 FTP 28
Chapter 6 : WS_FTP?,,,, (KB/S) 29
, URL, IP, URL, IP ( ) Appendix B 30
Chapter 7 : SSL SSL (SSL) SSL? SSL(Secure Socket Layer) SSL SSL Step 1 SSL Step 2 Step 3 Step 4 Step 4 Step 4 Step 2 Step 5, 31
SSL SSL SSL (Client) (Certificate) SSL crt (Sesion Key) (Public Key) (Private Key) key (Certificate Signing Request) SSL Account SSL SSL : 1 (SSL) 2, SSL 3 4 32
: 1 (SSL) 2 3 4 5 6 SSL : 1 SSL SSL 2 3 4 ( ) 5 / 33
/ fully qualified domain name,,, (, ) 6,, SSL SSL : 1 SSL ( ) 34
2 SSL ( ) 3,,, 4 5 : 35
1 2 : 1 2 3 : 1 2 3 4 SSL 36
: 37
Chapter 8 : WS_FTP FTP ( ) : # deleting fileaext # sending filebext 19960217/ 00:00 (19950217 / 00:00) # receiving filecext 19960217 / 00:00 (19950217 / 00:00) 38
WS_FTP WS_FTP armstrong( ) : FTP FTP /idstuff PC C:\docutorials FTP, (SSL) SSL FTP SSL SSL SSL SSL,, WS_FTP WS_FTP 39
( ) *? /mydir/*exe, mydir\, m*ir\, \m?dir\, /mydir/nexdir/myfil?*, mydir\*exe : /mydir/*exe Mydir exe Mydir\ mydir \m?dir\ M?dir? M*ir\ M*ir * M ir /mydir/nextdir/myfie?* /mydir/nexdir Myfil Mydir\*exe mydir exe 40
Ftpsync f controlfilectl WS_FTP 41
Chapter 9 : WS_FTP FTP PC FTP FTP : 1 WS_FTP 2 FTP URL 3,,, 4 FTP, Ipswitch FTP filelisttxt 42
FTP : : 1 2 ws_f * ws_f 43
(*?), *exe exe WS_FTP 2001 4 10 2001 4 20 44
: 1 2 3 4 & FTP KB 45
Chapter 10 : WS_FTP : FTP,, DOS : FTP Current Current prior Current Current 46
/ MS-DOS / ftpscrpt : ftpscrpt f script1scp ftpscrpt 95, 98, ME Autoexecbat NT 2000 47
: 1 transfertracetxt Trace 2 c:\default transferlogtxt 3 sdavis 4 fourthandgoal 5 ftp Mywebprovidercom, FTP 6 /user/user/sdavis/images) 7 C:\ \My Pictures 8 MGET FILEDELETE 9 MGET DISCONNECT 10 jpg 11 FILEDELETE 12 jpg /user/sdavis/images 13 DISCONNECT 14 FTP 48
Chapter 11 : FTP job : : ( Chapter 10 : ), 49
WS_FTP : 1 > 2 3 4 ftpscriptexe 5 WS_FTP f 6 NT workstation NT 7 8 : 1 Ctrl 50
2 3 4,, ( tmp ) 5 NT workstation NT 6 7 ( ) 1 2 3 4 NT workstation NT 51
5 6 52
Chapter 12 : FTP FireScript Appendix A : FireScript, ( ) (, FTP ) Proxy OPEN SITE hostname ( ) ( ), (ID) 53
Transparent USER after logon USER fireid@remotehost USER remoteid@fireid @remotehost USER remoteid@remotehost fireid USER with no logon (ID), ( ), (ID), ( ), (ID), ( ), (ID), ( ), (ID), ( ) 1 2 3 IP 4 Note FTP FTP () Passive 5 ID 6 7 8 9 54
: 1 : 2 3 4 IP 5 ID( ) 6 7 8 Note Firewall default Firewall FTP : 55
1 ( ) 2 : 1 2 3 ( ) 4 56
Chapter 13 : MS_DOS :, ASCII Binary (command name: wsftppro) (source) (destination) : wsftppro s local:c:\tartanbmp d robert!border:/pub/tartanbmp wsftppro Note Autoexecbat Path ( 95, 98, 2000, ME ) Path ( NT ) wsftppro s local:c:\tartanbmp d robert!border:/pub/tartanbmp ID,, Account ( )! Robert border 57
WS_FTP u w : wsftppro u username w password s robert!border:/pub/tartanbmp d local:c:\armstrong\ Account Account Account Account c : wsftppro c account s robert!border:/pub/tartanbmp d local:c:\armstrong\ IP URL, wsftppro s local:c:\tartanbmp d robert!border:/pub/tartanbmp s, local!, IP, FTP URL, FTP ; wsftppro s robert!border:/pub/tartanbmp d local:c:\tartanbmp wsftppro s ftp://username:password@borderipswitchcom/pub/tartanbmp -d local:c:\armstrong\ wsftppro u username p password s 156215078:/pub/tartanbmp d local:c:\ wsftppro s local:c:\tartanbmp d robert!border:/pub/tartanbmp d local! ( ), IP, FTP URL, FTP 58
: wsftppro s local:c:\tartanbmp d ftp://username:password@borderipswitchcom/pub/tartanbmp wsftppro s local:c:\tartanbmp u username w password d ; C Armstrong tartanbmp border /pub/ wsftppro s local:c:\armstrong\tartanbmp d robert!border:/pub/tartanbmp wsftppro s local:c:\armstrong\tartanbmp d robert!border:/pub/ / wsftppro s border:/pub/tartanbmp d robert!local:c:\armstrong\tartanbmp border tartanbmp C armstrong, Tagdoc FTP NewTagdoc 59
wsftppro s local:c:\sports\tagdoc d robert!border:/pub/drop/newtagdoc *?, C:\Sports\ wsftppro s local:c:\sports\** d robert!border:/pub/drop/ doc MS-DOS wsftppro s local:c:\sports\*doc d robert!border:/pub/drop/ lower, Tagdoc tagdoc Wsftppro s local:c:\sprots\tagdoc d robert!border:/pub/drop/ -lower Binary ASCII Binary ASCII binary ascii, MS_DOS (MS_DOS Dir ) 60
my tartanbmp, wsftppro s local:c:\armstrong\my tartanbmp d rebert!border:/pub/my tartanbmp MS_DOS 95 my tartanbmp, MS_DOS Dir my~1doc, MS DOS MS_DOS : wsftppro s local:c:\armstrong\my~1bmp d robert!border:/pub/my~1bmp MS_DOS (bat ) MS_DOS bat bat ( ) bat tartanbat border FTP tartanbmp wsftppro ( FTP ), Note 2 61
, m MS_DOS wsftppro m xferalltxt xferalltxt : wsftppro WS_FTP Chapter 11 : quiet ( ) 62
xferalltxt 10:00 pm auto10bat,, armstrong border FTP armstrong family, arms, photos border MS_DOS Wsftppro m DirStructtxt p FTP Wsftppro p highland!armstrong s local:c:\armstrong\my~1bmp d ftpanysitecom:/pub/my~1bmp armstrong ftpanysitecom 63
wsftppro ask border wsftppro p robert!border quiet : wsftppro s local:c:\armstrong\tartanbmp d robert!border:/pub/tartanbmp quiet ( ) -ascii -binary ascii, binary -c account Account c Account FTP Account -d path_and_filename d -lower PC FTP -lower lower -m text_file, m Text_file 64
-p site_name site_name -p I p defaultini I ini -quiet quiet -s path_and_filename s -u userid ID u -w password FTP password w 65
Appendix A : FireScript FireScript FTP FireScript? FireScript FTP FTP, FireScript FireScript FireScript FireScript FireScript SSL XAUTH ID Account FireScript FireScript fwsc, comment, script ini ([]) Fwsc ini name=value Comment Script FireScript FireScript [fwsc] author=ipswitch connectto=firewall required= version= 66
[comment] FTP FireScript [script] send( OPEN %HostAddress ) {} tryssl; send( USER %HostUserId ) { case(300 399) : continue ; ase any : return (false) ; } label success ; gossl ; return (true) ; fwsc fwsc ini author version IP Fwsc Author Version Verdate Required, FireScript,, 67
, Preask Connectto, IP Comment Comment FireScript FireScript comment C++ // script // Script Script FTP, FTP, FTP API CreateConnection 1: FTP 2: FireScript FireScript 68
fwsc required preask connectto FTP IP WS_FTP Pro IP FireScript FireScript CreateConnection FireScript FireScript,, FireScript : contains ( lastreply, Welcome to my cool FTP site ) ; : contains ( lastreply, Welcome to my cool FTP site ); FireScript FireScript ID, FTP IP, IP, FTP URL 69
FireScript : FireScript FwUserId FwPassword FwAccount FwAddress HostUserId HostPassword HostAccount HostAddress LastFtpCode LastReply ID Account Account IP FTP FTP ID ID Anonymous FTP ID ID Anonymous FTP Account, FTP ID Account IP FTP 3 LastFtpCode 230, 230 user logged in FireScript FireScript 70
FireScript, This is a string % % %% % % % : send ( OPEN %HostAdress ) HostAddress ftpipswitchcom : send ( OPEN ftpipswitchcom ) contains (lastreply %% full ) : contains (lastreply % full ) send ( SITE SETLOG % f:\log files\accesslog% clear ) SITE SETLOG f:\log files\accesslog clear : isempty (FwPassword) isempty ( %FwPassword ) 71
FireScript boolean contains isempty boolean not and contains true isempty true not boolean Example: HostAccount usr987i isempty(hostaccount) false not isempty(hostaccount) true and boolena true, HostAccount usr9871 230 User logged in, please send account true Case (200299) and not isemtpy (HostAccount) and contains (lastreply, ACCOUNT:) ; FireScript FireScript Switch send xauth switch switch switch case C++ case send xauth switch {} case {<case >} Case {} {} 72
switch : send ( USER %FwUserID ) {} send 512 FTP send case xauth WS_FTP xauth invitation WS_FTP invitation, xauth case invitation ID xauth send case Case Case switch Case case (:) Case Case Case FTP, case, any timeout Case ftp / case any timeout Case case ftp 226 231 Case (226, 231) : 73
case ftp 226 231, 250 299 Case (226, 231, 250299) : case ftp 300 email address Case (300399) and contains(lastreply, email address ) : case ftp 500 Case (500999) and contains(lastreply, user %HostUserID cannot login ) : Case and And ftp 500 599 lastreply true false case Not : Case (500599) and not contains (lastreply, server is busy ) : Or case Case timeout : Case any case case case case, case Case any ; Case case : case (200299) and contains(lastreply, please send user account ) : case (200299) : case case 74
Continue C C++ case case case switch Continue switch C/C++ switch break switch, send xauth case Jump Label jump label Ipswitch FireScript case jump case label label, label jump jump, label case case Return Return true false True False Autodetect Autodetect FTP Autodetect FTP Autodetect Microsoft NT Ipswitch WS_FTP 220 tstsrvnt Microsoft FTP Service (Version 30) 220 tstsrvws X2 WS_FTP Server 105 (1737223651) FTP 75
, autodetect ftp autodetect ftp,, ftp autodetect Autodetect Autodetect SSL Tryssl gossl SSL gossl, false tryssl, SSL, tryssl gossl SSL Use SSL SSL FireScript FireScript Label Ggossl tryssl autodetect Send xauth case Continue and not Any timeout return Jump label true False 76
FireScript FireScript (parser) Label Switch if for Next while loop Break function int Bool string var Password or FireScript Gossl tryssl autodetect send xauth jump return continue FireScript contains isempty FireScript FwUserId FwPassword FwAccount FwAddress HostUserId HostPassword HostAccount HostAddress LastFtpCode LastReply 77
Appendix B:, FTP WS_FTP Ipswitch KnowledgeBase wwwipswitchcom Blocking call canceled : 1 FTP passive 2 120 : 120 3 FTP(WS_FTP ) 4 FTP 78
Cannot create file : ; Can t get xxx host entry FTP IP ( Domain Name Server IP ) IP : ftpipswitchcom ; http://ftpipswitchcom/ipswitch/product_downloads ftp://ftpipswitchcom Can t set guest privileges FTP Anonymous FTP ID Anonymous ID Connection refused FTP FTP Directory identifier unavailable FTP 79
Disk quota exceeded ; FTP ( ) Failed data channel FTP passive File too large to download FTP Illegal port command FTP passive Invalid page fault PC FTP Logon failure; Quitting FTP ID ( ) FTP ID MDTM FTP Month-Day-Time-Marking ; WS_FTP FTP 80
Port command failed FTP passive User access denied 530 user access denied,, FTP FTP FTP Anonymous ; ID Anonymous, Anonymous Ipswitch FTP (ftpipswitchcom) FTP, ID 81