Azure + vsftpd + ubntu14 + problems with virtual users: excerpt from the Web

Source: Internet
Author: User
Tags ftp file filezilla filezilla ftp

: 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

chmod a-w/home/user

But to have a certain permission, so you can add a 777 or 700 before removing the W permission

Reference url:http://eamin.net/vsftpd-500-oops/

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

Pasv_enable=yes

pasv_max_port=30019

pasv_min_port=30000

(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 Enable

#ufw status

#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

Url:http://blog.sina.com.cn/s/blog_76fbd24d010134p9.html

Http://www.cnblogs.com/acpp/archive/2010/02/08/1665876.html

http://blog.csdn.net/gavin_dinggengjia/article/details/7538118 (Virtual user)

http://eamin.net/vsftpd-500-oops/

http://www.cnblogs.com/ggjucheng/archive/2012/01/08/2316661.html (netstat command)

Http://www.seowhy.com/bbs/thread-13199384-1-1.html

http://zhumeng8337797.blog.163.com/blog/static/100768914201041411362557/

Http://www.tuicool.com/articles/IfMBry

Http://www.3lian.com/edu/2013/05-18/70558.html

In foreign languages: Http://serverfault.com/questions/421161/how-to-configure-vsftpd-to-work-with-passive-mode

http://www.krizna.com/ubuntu/setup-ftp-server-on-ubuntu-14-04-vsftpd/

Azure + vsftpd + ubntu14 + problems encountered by virtual users: excerpt from the Web

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.