Quick guide to getting started
- Grab the latest version of the code.
- Set configuration values:
- 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:
- Diagnostics: provide your Azure account name and key to enable logging in Azure table storage;
- StorageAccount: the same Azure account;
- FtpServerHost: specify the ftp server url (e.g. "myServer.cloudapp.net"), this will be used to get the ipv4 address of the server in
- Mode: if you want to test the server with the development storage, set Mode="Debug"; otherwise, set Mode="Live" for remote cloud storage.
- 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.
- 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
of the AzureFtpServer
project (which reads the setting from the RoleEnvironment and supplies the
function to check if a <username, password> pair is valid, and this function will be called in
Things to note:
- The FTP server must be deployed in a production Azure environment.
- 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.
- If you see ECONNABORTED, the Azure FTP server encountered an error and the most likely cause was misconfigured blob storage.
- 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.