Guide to install vsftp on Ubuntu Server on Windows Azure
June 7, 2013 – 11:50 pm | 9 Comments

Once you install a Linux box on Azure you will want some way to send files to and from it. There are plenty of options but one way is to use plain old FTP. The …

Read the full story »
Online Gaming

All about online gaming focusing mainly on First Person Shooters on the PC platform. Consoles may get a mention also but PCZFTW

Game Programming

If its making mods using scripting languages like Unrealscript or dealing with SDK’s like DirectX using C++ it’s in here.

Dot NET

Focusing on the Windows .NET platform. Programming in C# using Visual Studio.

General Computing

Everything got to do with using computers. Whether its Windows, Linux, Mac or other flavour its in here.

Computer Hardware

Graphics Cards, CPU’s, Memory and everything else got to do with building your own PC and modding your existing ones.

Home » Featured, General Computing, Headline

Guide to install vsftp on Ubuntu Server on Windows Azure

Submitted by on June 7, 2013 – 11:50 pm9 Comments

Once you install a Linux box on Azure you will want some way to send files to and from it. There are plenty of options but one way is to use plain old FTP. The following guide will explain how to set up an FTP server (specifically vsftp) on a Ubuntu Server virtual machine on Windows Azure without any headaches.

1) SSH into your box using your client of choice.

2) Download and install vsftp by issuing the following command.
apt-get install vsftpd

3) Edit the vsftpd configuration file using your editor of choice. I personally prefer ‘nano’ over ‘vi’.
nano /etc/vsftpd.conf
ip
4) You need to add a few things to make sure you can access from outside.

pasv_enable=YES
pasv_address=[Your outside IP. See Image 1]
pasv_min_port=12000
pasv_max_port=12003
seccomp_sandbox=NO

The pasv_ options are essential. Without them, when you try and login it will fail with the following error
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (112,136,13,157,23,70).
Status: Server sent passive reply with unroutable address.
Using server address instead.
Command: LIST
Error: Connection timed out
Error: Failed to retrieve directory listing


Without the seccomp_sandbox command the logon attempt might outright fail with the following.
500 OOPS: priv_sock_get_cmd
If you use the above settings you should be fine. I only describe the errors in-case anybody is reading this looking for a solution to one of them.
Once you make any changes to the config file you need to restart the ftp server using the following
/etc/init.d/vsftpd restart

5) The last thing you need to do is to log into your Azure control panel at https://manage.windowsazure.com. Once there you need to create an endpoint so that you can access the server remotely. endpointOnce in your control panel click on whatever title you gave your server box then click on ‘Endpoints’. From here click on add at the bottom. Since it is an FTP server you can call the new endpoint FTP. The internal port needs to be 21 but you can number the external port whatever you want. Security minded people would probably number it something other than 21 but in my opinion this is just security through obscurity which is no security at all so as long as you have followed some basic rules when choosing a password you should be fine and just go ahead and use 21 as the external port also.
One thing I may add is the Internet is full off zombie computers that spend their time scanning the well known server ports.

You should now be able to log in using your favourite ftp client such as FileZilla.

9 Comments »

  • I have tried but it did not work for me.

    What is the user to login into the FTP.

    Can you please help me to do that ?

  • ClearZ says:

    The user is the same user as you log in to ssh with. You probably set it up in the Azure control panel. It wont let you log in using the root account.

  • JF says:

    Hi,

    I just tried your solution. Does not seems to work. I keep getting

    Command: LIST
    Error: Connection timed out
    Error: Failed to retrieve directory listing

    Any idea ?

  • ClearZ says:

    JF make sure your Transfer Mode is set to Active. This can be found under the ‘Transfer Settings’ tab in the Site Manager window in Filezilla.

  • Eddie Jenkins says:

    There is one more step.. You must open ports 12000, 12001, 12002, 12003 on Azure (as per the example above)

  • Quand clash of clans hack vous-même achetez un rigolade revers votre androïde , assurez-toi-même desquels toi-même avez lésiner spécifications quant
    à l’exécuter . En particulier, si le partie élevant voilé , et
    votre marionnette est vieux, toi-même risquez d’être déçu si toi
    vérifiez d’dehors . Regardez la pouvoir

  • weitao says:

    this command :
    /etc/init.d/vsftpd restart

    should be:
    sudo restart vsftpd

  • This is my first time i visit here. I found so manyentertaining stuff in your blog, especially its
    discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! Keep up the good work.

    Queensland Institute of Commerce and Technology

  • Andrew says:

    This seems fine for regular FTP; however, it’s my understanding that secure FTP is a safer alternative to plain old FTP since account names and passwords are exposed as they cross the network in plain old FTP.

    Do you know how one goes about using vsftp to set up a secure FTP service?

    thank you

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

Code*: