![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Microsoft Windows xp error all errors and bugs related to Microsoft winxp error |
![]() |
|
Ftp server and client
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Administrator
Posts: 18,703
Join Date: Jan 2006
Rep Power: 10
IM:
|
FTP (File Transfer Protocol) - An Internet protocol that allows users to transfer files from and to remote computers. If you have IIS (Internet Information Services) installed on your computer, you can set up your computer as a FTP server. Here is how: 1. Run Control Panel / Administrative Tools / Internet Information Services. 2. Expand the "local computer" entry and the "FTP Sites" folder, you will see the "Default FTP Site" service. 3. Right mouse click on the "Default FTP Site", and select Properties. The properties dialog box shows up. 4. Click on all the tabs. You will see all the settings. Some of them are important to know:
6. Test your FTP server, run the commands in a command window: >ftp localhost Connected to localhost. 220 Microsoft FTP Service User (localhost none)): anonymous331 Anonymous access allowed, send identity (e-mail name) as password. Password: me@herongyang.com 230 Anonymous user logged in. ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. 226 Transfer complete. ftp> quit FTP Command Line Client Program Windows XP comes with a FTP command line client program, c:\windows\system32\ftp.exe. Once it's launched, it takes FTP commands from the keyboard. Here are some useful used FTP commands:
ftp> help Commands may be abbreviated. Commands are: ! delete literal prompt send ? debug ls put status append dir mdelete pwd trace ascii disconnect mdir quit type bell get mget quote user binary glob mkdir recv verbose bye hash mls remotehelp cd help mput rename close lcd open rmdir Downloading Files Now, let's see how we can put some files on the FTP server to allow other users to download them. Copy files to the FTP server directory in a command window: >copy ftp.html c:\inetpub\ftproot 1 file(s) copied. >copy index.html c:\inetpub\ftproot 1 file(s) copied. >copy reference.html c:\inetpub\ftproot 1 file(s) copied. Download them with the FTP client in a command window: >ftp localhost Connected to localhost. ... ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. 11:05PM 5537 ftp.html 03:43PM 5082 index.html 08:39PM 1174 reference.html 226 Transfer complete. ftp: 155 bytes received in 0.00Seconds 155000.00Kbytes/sec. ftp> mget *.* 200 Type set to A. mget ftp.html? y 200 PORT command successful. 150 Opening ASCII mode data connection for ftp.html(5537 bytes). 226 Transfer complete. ftp: 5537 bytes received in 0.01Seconds 553.70Kbytes/sec. mget index.html? y 200 PORT command successful. 150 Opening ASCII mode data connection for index.html(5082 bytes). 226 Transfer complete. ftp: 5082 bytes received in 0.01Seconds 508.20Kbytes/sec. mget reference.html? y 200 PORT command successful. 150 Opening ASCII mode data connection for reference.html(1174 bytes). 226 Transfer complete. ftp: 1174 bytes received in 0.00Seconds 1174000.00Kbytes/sec. ftp> quit 221 Cool, downloading files are easy. The "mget" command allows you to get multiple files with one command. Checking the Log File If you look the settings, you will find out that the log file is located in C:\WINDOWS\System32\LogFiles\MSFTPSVC1 directory. Open the last log file, exnnnnnn.log, you should see something like: #Software: Microsoft Internet Information Services 5.1 #Version: 1.0 #Date: 03:55:34 #Fields: time c-ip cs-method cs-uri-stem sc-status 03:55:34 127.0.0.1 [1]USER anonymous 331 03:55:42 127.0.0.1 [1]PASS me@herongyang.com 230 03:55:49 127.0.0.1 [1]QUIT - 226 04:07:57 127.0.0.1 [2]sent /ftp.html 226 04:07:57 127.0.0.1 [2]sent /index.html 226 04:07:58 127.0.0.1 [2]sent /reference.html 226 To upload files, run the FTP client in a command window: >ftp localhost Connected to localhost. 220 Microsoft FTP Service User (localhost none)): herong 331 Password required for herong. Password: ******** 230 User herong logged in. ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. 11:05PM 5537 ftp.html 03:43PM 5082 index.html 08:39PM 1174 reference.html 226 Transfer complete. ftp: 155 bytes received in 0.00Seconds 155000.00Kbytes/sec. ftp> put help.html 200 PORT command successful. 150 Opening ASCII mode data connection for help.html. 226 Transfer complete. ftp: 728 bytes sent in 0.00Seconds 728000.00Kbytes/sec. ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. 11:05PM 5537 ftp.html 11:53PM 728 help.html 03:43PM 5082 index.html 08:39PM 1174 reference.html 226 Transfer complete. ftp: 205 bytes received in 0.00Seconds 205000.00Kbytes/sec. ftp> quit 221 Note that:
Interesting, it did not record the "dir" command. Uploading Files Allowing other users to upload files to your FTP server needs some extra security settings. So let's re-visit the IIS FTP Server settings: 1. Run IIS, and open the Default FTP Site properties dialog box. 2. Visit the Security Accounts and Home Directory tabs, and making the following changes:
221 Congratulations, you have created a working anonymous FTP server! |
|
|
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|