The construction of VSFTP server under Linux

Source: Internet
Author: User
Tags server port

VSFTP is an abbreviation for very secure FTP. It is divided into active mode and passive mode, and the port is divided into command port (21) and data port.

In active mode: 1. The client opens a command channel with a random port x greater than 1024 and a 21 port on the FTP server.

2. When the client has a data transfer requirement, turn on the random port y greater than 1024 again and tell the FTP server via the command channel

The 3.FTP server actively connects the client's port y via TCP's 3-time handshake

In passive mode: 1. The client opens a command channel with a random port x greater than 1024 and a 21 port on the FTP server.

2. When the client has data transfer requirements, the request is sent through the command channel.

3. After the server accepts the request, open a random port y greater than 1024 and tell the client

4. After the client receives the notification, it opens a random port x greater than 1024, and then establishes a connection with the server Port Y.

Experiment begins:

Purpose: To satisfy both anonymous and real-name users, and to "upload", "delete", "rename" the operation.

VSFTPD.CONF configuration:

anonymous_enable=yesanon_root=/var/ftp/pub/local_enable=yeswrite_enable= yesanon_upload_enable=yesanon_mkdir_write_enable=yesanon_other_write_enable=  Yesdirmessage_enable=yesxferlog_enable=yesconnect_from_port_20=yesxferlog_std_ Format=Yeslisten=yespam_service_name=vsftpduserlist_enable=yestcp_ Wrappers=yes

Test real-Name users first:

Useradd-s/sbin/nologin FTP1

echo FTP1 |passwd FTP1--stdin

Touch/home/ftp1/helloworld.txt

It takes a lot of time to focus on testing anonymous users.

Summary down is not directly to the Anon_root directory 777 permissions, you must establish a new directory under this directory, and then give the FTP user rwx permissions to this directory

Like what:

Mkdir/var/ftp/pub/anon

chmod 777/var/ftp/pub/anon//other permissions must be 7

Chwon FTP. /var/ftp/pub/anon This step is not necessary

That is, although the user and group of the files created by anonymous users are FTP, you do chown ftp. And chmod 770 is useless and must have permission others. This is weird ...

The construction of VSFTP server under Linux

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.