How to setup an FTP server in Windows using IIS

Posted on February 19, 2008 at 6:56 am

Earlier, I had written a post on how to turn your computer into a Windows file sharing server using a program called HFS. If you’re looking for a quick way to share the files on your local computer with friends or family, this is an easy way to do so.

However, if you’re looking to setup your own FTP server in Windows using IIS, you can do so, but it requires more technical knowledge. Of course, it also gives your more granular control over sharing and security, so it’s better for anyone who has a little computer know-how.

How to setup and configure an FTP server in IIS

The first thing you’ll need to setup your own FTP server in Windows is to make sure you have Internet Information Services (IIS) installed. Remember, this only comes with Windows XP Professional or Windows Vista Business or higher.

Click on Start, Control Panel and go to Add/Remove Programs. Then click on Add/Remove Windows Components.

add remove programs

In the components wizard, scroll down until you see IIS in the list and check it off. Before you click Next though, make sure you click on Details and then check off File Transfer Protocol (FTP) Service.

iis

file transfer protocol

Click OK and then click Next. Windows will go ahead and install the necessary IIS files along with the FTP service. You may be asked to insert your Windows XP or Windows Vista disk at this point.

Setup and configure IIS for FTP

Once IIS has been installed, you may have to restart your computer. Now we want to go ahead and open the IIS configuration panel to setup our FTP server. So go to Start, then Control Panel and click on Administrative Tools. You should now see an icon for Internet Information Services.

IIS[6]

When you open IIS for the first time, you’ll only see your computer name in the left hand menu. Go ahead and click the + symbol next to the computer name and you’ll see a couple of options like Web Sites, FTP Sites, etc. We’re interested in FTP Sites, so expand that out also. You should see Default FTP Site, click on it.

ftp site

You’ll notice after you click on the default FTP site that there are a couple of buttons at the top that look like VCR buttons: Play, Stop, and Pause. If the Play button is greyed out, that means the FTP server is active. Your FTP server is now up and running! You can actually connect to it via your FTP client software. I use Smart FTP, but you can use whatever you like best.

Open your FTP client software and type in localhost as the host name and choose Anonymous for the login. Connect and you should now see an empty folder.

localhost

Ok, so that’s step 1! Now where the heck is this folder that you are currently viewing? Well the default FTP site is actually located in C:\Inetpub\ftproot. Open this directory and dump some files into it.

ftp files

Now refresh on your FTP client and you should now see your files listed!

ftp sites

So you now have an up and running FTP server on your local computer. Before I show you how you can create separate folders that are stored in a different directory other than the default Inetpub folder, let’s first connect to our FTP server from another computer on the network.

In order to do this, you’ll have to open up the Windows Firewall to allow FTP connections to your computer, otherwise all external computers will be blocked. You can do this by going to Start, Control Panel and then clicking on Windows Firewall. Click on the Advanced Tab.

windows firewall

Under the Network Connection Settings section, make sure all of the connections are checked in the left list and then click on the Settings button. You’ll now be able to open certain ports on your computer based on the service your computer is providing. Since we are hosting our own FTP server, we want to check off FTP Server.

ftp services

A little popup window will appear with some settings that you can change, just leave it as it is and click OK. Click OK again at the main Windows Firewall window. You have now opened up the firewall for FTP connections. Now try to connect to your FTP site from a different computer on your network. You’ll need to get the IP address of the computer first before you can connect into it from a different computer.

Go to Start, click Run and type in CMD. Type IPCONFIG and jot down the number for IP Address:

ip address

In your FTP client on the other computer, type in the IP Address you just wrote down and connect anonymously. You should now be able to see all of your files just like you did on the FTP client that was on the local computer.

Now that the FTP site is working, you can create as many folders as you like for FTP purposes. In this way, when a user connects, they specify a path that will connect to one specific folder.

Back in IIS, right click on Default FTP Site and choose New, and then Virtual Directory.

virtual directory

When you create a virtual directory in IIS, you’re basically going to create an alias that points to a folder on the local hard drive. So in the wizard, the first thing you’ll be asked is for a alias name. Make is something simple and useful like “WordDocs” or “FreeMovies”, etc.

virtual directory alias

Click Next and now browse to the path where you want the alias to refer to. So if you have a bunch of movies you want to share, browse to that folder.

ftp server

Click Next and choose whether you want it as Read access only or Read and Write access. If you simply want to share files, check Read. If you want people to be able to upload files to your computer, choose Read and Write.

read write

Click Next and then click Finish! Now you’ll see your new virtual directory below the default FTP site. You can connect to you using your FTP client by putting in the Path field “/Test” or “/NameOfFolder”.

ftp connection

Now you’ll only see the files that are in the folder we had browsed to.

anonymouse

And that’s about it! You can create as many folder as you like! The only thing other thing that you would need to do is to give out your public IP address to anyone who is connecting from outside of your internal network. If you want users to connect from anywhere in the world, you’ll have to give them your public IP address, which you can find out by going to http://whatismyipaddress.com/.

Finally, you’ll need to forward the FTP port on your router to your local computer that is hosting the FTP server. Port Forward is a great site to show you how to forward ports on your router to computers on your home network.

Any questions, post a comment! Enjoy!

Enjoyed this post? Subscribe to Online Tech Tips via RSS Feed or via Email and receive free daily productivity tips.

» Filed Under Computer Tips

Add to Delicious Save this page Mixx it Stir it up on Mixx
Reddit Add to Reddit StumbleUpon Stumble this page  

Related Posts

20 Responses to “How to setup an FTP server in Windows using IIS”

  1. Bắc said on :

    Thank your post! It helped me setup an FTP server on my local machine very much!


  2. Adam said on :

    The walkthrough on this website was great. It was easy to setup and actually works. Thanks alot.


  3. keLzy said on :

    Thanks for the INFO, it was very comprehensive and straight to the point.


  4. Paul said on :

    So, I want some people (anonymous) to have read access, others read/write. How do I do this based on your demo. I assume I create a local user account, but how do I give it write perms?


  5. vaibhav said on :

    i set up IIS using my windows professional cd but when i went to administrative tasks and clicked on IIS and looked for default ftp site - it was not there . whats to be done now ?
    i need to set up an ftp server on my pc so that my brother ( 2 cities away ) can have access to information on my computer . Thanking in anticipation . Vaib .


  6. toph payas said on :

    just want to ask, is it possible to run an FTP Server on a Windows XP machine?

    thanks,

    toph payas


  7. John said on :

    Nice guide; needed the FTP site to test a command line for an SFTP program.
    Shame about the noobie Qs :o)


  8. Monty said on :

    My internet access plan come with the static IP address, however the my ip address in my computer got changed to 10.1.1.5 by the router. With this ip address I am not able to setup the ftp server. Any solution?


  9. Kevin said on :

    Monty,

    The article explains this. 10.1.1.5 is the ip address the router assigned your computer. The router has its own IP issued by your ISP. When a request comes in for FTP, it contacts your router via the public IP (the one issued by your ISP). You router, using a port forwarding rule, will forward the request to your PC at the correct port (probably 10.1.1.5:21). They key is that you need to create a rule in your router to forward all requests on port 21 (or whatever port you have configured for FTP) to your PC address 10.1.1.5. You also need to setup static IP address for your computer when connecting to the router, otherwise, the router might assign an address other than 10.1.1.5.

    Visit http://whatismyipaddress.com/ to get your public IP address.


  10. bobby said on :

    I get confused after the ip address instruction, where do i type in the ip address on the server or the client, thanks for the guide :)


  11. jedfai said on :

    what a great site and well understood instruction. though i have no technical knowledge like a system administrator with this instruction i become confident wish to learn many things about IT job. Thanks also guys for the comments it really helps me to understand what the good and bad side.


  12. winthu said on :

    thanks!


  13. rahul said on :

    This is very lucid and to the point explanation

    many thanks.


  14. praveen said on :

    thanks a lot for this article


  15. Sandesh Deshkar said on :

    hi,

    i have set up an FTP access to my local machine using IIM.

    But now i want to get access to my local maching using FTP from my VPS (Virtual private server).

    Please guide me how can i do that.

    Also do i need to open my router port. (by the way, i am not getting my connection through router but it is coming via direct cable)

    Thanks.


  16. sudhakar said on :

    Thank you so much of this information.

    from,
    transdyne.co.in


  17. louise said on :

    You are my life saver!!!


  18. Gopinath.AP said on :

    thank you its very useful! I was able to setup an FTP server in no time!


  19. Kami said on :

    How can I setup a password on the FTP site and protect the documents.

    Thanks


    Pingbacks
  1. How to create an FTP server using FileZilla Says:

    [...] I wrote how to setup your own FTP server using IIS and in this tutorial we will show you how to setup your own FTP server using the free software [...]

Please post your comments/suggestions!