Error » Microsoft Error! » Microsoft Operating Systems Error » Microsoft Windows xp error » Ftp server and client

Microsoft Windows xp error all errors and bugs related to Microsoft winxp error

Post New Thread Reply
  Ftp server and client
LinkBack Thread Tools Display Modes
Old 19-Dec-2006, 09:28 PM   #1 (permalink)
Administrator
 
Anilrgowda's Avatar

Posts: 18,703
Join Date: Jan 2006
Rep Power: 10 Anilrgowda is on a distinguished road

IM:
Default Ftp server and client

  • Setting Up FTP Server
  • FTP Command Line Client Program
  • Downloading Files
  • Checking the Log File
  • Uploading Files
Setting Up FTP Server
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:
  • Port: 21
  • Enable Logging: checked
  • Log File Directory: C:\WINDOWS\System32\LogFiles
  • Log File Name: msftpsvc1\exyymmdd.log
  • Allow Anonymous Connections: checked
  • FTP Site Directory Local Path: c:\inetpub\ftproot
5. Right mouse click on the "Default FTP Site", and select Start. Your FTP server should be running now.
6. Test your FTP server, run the commands in a command window:
>ftp localhost
Connected to localhost.
220 Microsoft FTP Service
User (localhostnone)): anonymous
331 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:
  • open "host_name" - Establishes a connect to the FTP server at the specified host.
  • disconnect - Stops the current connect.
  • user "user_name" - Provides user name and password to pass the access authentication.
  • quit - Quits the FTP program.
  • dir - Displays the contents of the current directory on the server.
  • cd "relative_path" - Changes the current directory to specified path on the server. "cd .." changes the current directory one level up in the directory tree.
  • lcd "relative_path" - Changes the current directory to specified path on the local system.
  • get "file_name" - Downloads the specified file from the server.
  • put "file_name" - Uploads the specified file to the server.
  • mget "*.*" - Downloads the specified multiple files from the server.
  • mput "*.*" - Uploads the specified multiple files to the server.
  • !dir - Displays the contents of the current directory on the local system.
  • type "binary|ascii" - Changes the file transfer type to binary or ASCII. In binary type, files will be transferred as is. In ASCII type, files will be transferred with automatic conversion to match the receiving system file format. For example, a text file on a Unix FTP server will be downloaded to a Windows local system with line feed character being converted to two characters, line feed and carriage return.
  • prompt - Switches on or off the prompt for confirmation when using the mget and mput commands.
  • help - Displays all available commands supported by the FTP client program.
Below is a list of all available commands supported by Windows command line FTP client program:
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 (localhostnone)): 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:
  • To access the FTP server, you need provide a user name and a password of the server's Windows system.
Conclusion
  • Windows provides FTP server service through IIS (Internet Information Services), which is relatively easy to manage.
  • Windows also provides a command line client FTP program. If you are interested in client programs with graphical user interface, there are a number of shareware available on the Interface.
  • You should be careful about running your FTP server with anonymous option turned on. Anonymous option allows anyone on the Internet to come to your server and take files away from FTP directory.
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.

221
Congratulations, you have created a working anonymous FTP server!
Anilrgowda is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
   


   
Post New Thread Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -8. The time now is 08:38 PM.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

DMCA Policy

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230