|
FTP Server and Client
Part:
1
2
3
4
(Continued from previous part...)
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
03:55:49 127.0.0.1 [1]QUIT - 226
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:
- Allow Anonymous Connections: unchecked - To stop other users accessing your FTP server anonymously.
The server can only be accessed now by admin users registered on your machine.
- FTP Site Directory Write: checked - To allow other users to upload files.
(Continued on next part...)
Part:
1
2
3
4
|