: Install Ubuntu virtual machine in Azure, install package Choose ubuntu14.04 LTS, choose Lts, so that Microsoft will better support for it later, do not choose the technical support is not long, now only open one, port default selection 22
: Open virtual machine, enter endpoint settings, Port 22 is enabled
: Connect virtual machine with Xshell in local windows, use SSH2 mode, host address under the virtual machine's dashboard SSH details see, port Select 22
: The connection was successfully installed Vsftpd:sudo apt-get install VSFTPD
: Then configure: sudo vim/etc/vsftpd.conf
: For security considerations and for various reasons: Prohibit anonymous, disable active mode, do not configure local user login, use virtual user login
: About active mode and passive mode, it is necessary to understand, here I use the passive mode
Here I refer to: http://blog.csdn.net/gavin_dinggengjia/article/details/7538118 (Configure virtual users)
http://www.cnblogs.com/acpp/archive/2010/02/08/1665876.html (Configuring virtual users)
The two advantages of mutual access.
1, wherein, need to install Db_load first, can present newer db6.0_util, then put db4.6_load-t-T hash-f/etc/vsftpd/login.txt/etc/vsftpd/vsftpd_ Login.db in the db4.6 for 6.0.
2, there is a pit is Pam authorization file
Auth required/lib/security/pam_userdb.so Db=/etc/vsftpd/vsftpd_login
Account Required/lib/security/pam_userdb.so Db=/etc/vsftpd/vsftpd_login
My in accordance with this setting is not logged on, and then search the internet for a bit, remove the/lib/security/this section, changed to
Auth Required pam_userdb.so Db=/etc/vsftpd/vsftpd_login
Account Required Pam_userdb.so Db=/etc/vsftpd/vsftpd_login
I'm using tab alignment between them.
3, for the Set/home/ftp folder, it is necessary to explain the permissions problem, remove his w (write) permissions
But to have a certain permission, so you can add a 777 or 700 before removing the W permission
4, in the/home/ftp set up a new folder, I give it 777 permissions, this folder can be used to upload the download can be, the other can be configured according to the appearance
: It is necessary to understand the relevant parts of Ubuntu permissions, such as 777, 700, 600, etc.
: Then the choice of active mode and passive mode
I use passive mode because it is a complement to active mode
When you don't know what version of download software to choose, do not hesitate to use the latest, as a developer, with the times, you do not support the latest version of others, how to let your customers accept your release of the new edition
In the Conf configuration file, add
(Note: Max is the maximum port number above, Min is the smallest and value is the middle range)
Then open the endpoint in Azure's virtual machine, add these 20 ports, choose the TCP mode
Another point is the internal and external network reason: the equivalent of 2 sides are used routers, so also configure a:
pasv_address=xx.xxx.xx.x (This is a lot of times, it is necessary, there is a lot of internet not mentioned, Tai hang)
Of course, if it's a local connection, that's not necessary.
: I also had some NAT problems, but I didn't have to think about it.
: I use FileZilla FTP file and other operations, FileZilla open edit-Settings->ftp-> transfer Mode select Passive. After the failure to allow the return to the other transmission mode before the tick off, this is done because I only need to connect passively, not active mode.
: May be related to some of the firewall knowledge: Baidu Google a lot of, I will remember these several
#ufw Allow 22
: Now you should be able to upload the download file, the main collection of a lot of this useful web site, thanks to the great gods of these URLs
http://blog.csdn.net/gavin_dinggengjia/article/details/7538118 (Virtual user)
http://www.cnblogs.com/ggjucheng/archive/2012/01/08/2316661.html (netstat command)
In foreign languages: Http://serverfault.com/questions/421161/how-to-configure-vsftpd-to-work-with-passive-mode
Azure + vsftpd + ubntu14 + problems encountered by virtual users: excerpt from the Web