Quick guide to getting started

  1. Grab the latest version of the code.
  2. Set configuration values:
    1. All the configuration values needed by the code are accessed from the RoleEnvironment (ServiceConfiguration.cscfg file in the FTP2Azure project). And to make the ftp server work, you should mofidy the following settings:
    2. Diagnostics: provide your Azure account name and key to enable logging in Azure table storage;
    3. StorageAccount: the same Azure account;
    4. FtpServerHost: specify the ftp server url (e.g. "myServer.cloudapp.net"), this will be used to get the ipv4 address of the server in passive mode;
    5. Mode: if you want to test the server with the development storage, set Mode="Debug"; otherwise, set Mode="Live" for remote cloud storage.
    6. FtpAccount: We provide a simple account setting scheme that, you can set the valid <username:password> pairs in the .cscfg file without modifying the source code. The format is FtpAccount="(username1:password1)(username2:password2)", each pair is embraced by "()" and please do NOT contain ")" in passwords. And like previous versions, the usernames will be considered as container names in Azure Blob storage.
    7. You should not modify other settings unless you read the source code and know what they mean and how they effect the server.

How to set your own authentication scheme?

Although the simple setting scheme we supply is enough for common use, but if you want to set your own authentication scheme, you may modify the Ftp/AccountManager.cs of the AzureFtpServer project (which reads the setting from the RoleEnvironment and supplies the CheckAccount function to check if a <username, password> pair is valid, and this function will be called in Ftp/AzureFileSystemFactory.cs).

Things to note:

  1. The FTP server must be deployed in a production Azure environment.
  2. The default configuration listens on port 21, and when the clients connect in active mode, only this port will be used. But if the clients connect in passive mode, the server will use another port (default is 59860) for the data channel. You can change the port number in the ServiceDefinition.csdef file of the FTP2Azure project.

Common errors:

  1. If you see ECONNABORTED, the Azure FTP server encountered an error and the most likely cause was misconfigured blob storage.
  2. If you see ECONNREFUSED, the most likely cause of the error is that you're not trying to establish an active FTP connection on port 21, or the port that you have configured the server to listen on.

Last edited Nov 2, 2012 at 4:54 AM by junsu, version 5


Nerzhul Dec 21, 2012 at 4:56 PM 
Wow, man, this is wonderful tool! Big thanks!