Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Build FTP server by Centos7

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Brief introduction

FTP is the English abbreviation of File Transfer Protocol (File transfer Protocol), while the Chinese abbreviation is "text transfer Protocol". Used for two-way transfer of control files on Internet. It is also an application. There are different FTP applications based on different operating systems, and all of these applications follow the same protocol to transfer files. Generally used for file sharing, mainly uploading files to ftp servers or downloading files on ftp servers

two。 Deployment environment

Operating system: CentOS Linux release 7.3.1611 (Core)

IP:10.0.1.107

3. Deployment

3.1 install the vsftpd service

Yum install vsftpd-y

3.2 Editing the profile

# vim / etc/vsftpd/vsftpd.conf

Anonymous_enable=NO# does not allow anonymous users to log in

Limit ftp users to the home directory and add the following fields

Chroot_local_user=YES

Chroot_list_enable=YES

Chroot_list_file=/etc/vsftpd/chroot_list

Allow_writeable_chroot=YES

Leave everything else the same, and then create the chroot_list file in the / etc/vsftpd/ directory

# touch chroot_list

# set FTP mode to passive mode and related ports

Pasv_enable=YES

Pasv_min_port=50000

Pasv_max_port=55000

3.3 Firewall Open Port

Firewall-cmd-permanent-add-port=21/tcp

Firewall-cmd-permanent-add-port=50000-55000/tcp

Firewall-cmd-reload

3.4 create a FTP connection user

# useradd ftpuser

# passwd ftpuser

Disable ftp users from logging in to the system and modify the home directory, such as

# usermod-d / ftpuser/data-s / sbin/nologin ftpuser

4. test

4.1 start the vsftpd service

# systemctl start vsftpd

# systemctl restart vsftpd restart the service

4.2 create the data directory and abc.txt file under the / ftpuser/ directory

# cd / ftpuser/

# mkdir data & & cd data

# touch abc.txt

4.3 connecting to the ftp server

Linux client:

Ftp 10.0.1.107 and then enter the account password to log in

Windows client: testing with filezilla

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report