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

The Construction method of ftp Service

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

Share

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

This article focuses on "how to build ftp services". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to build ftp services.

1.rpm package installation

# yum install-y ftp

# yum install-y vsftpd

# yum install db4 db4-utils (Linux6)

# yum install-y libdb-utils (Linux7)

two。 Edit the main profile

# cd / etc/vsftpd/

# vi vsftpd.conf # add the following items

#

Anonymous_enable=NO

Local_enable=YES

Chroot_list_enable=YES

Ascii_upload_enable=YES

Ascii_download_enable=YES

Pam_service_name=vsftpd

Guest_enable=YES

Guest_username=ftp

User_config_dir=/etc/vsftpd/vconf

Pasv_enable=YES

Pasv_min_port=40000

Pasv_max_port=40080

Pasv_promiscuous=YES

Allow_writeable_chroot=YES (Linux7)

#

Create a chroot_list file

Touch / etc/vsftpd/chroot_list

3. Edit the FTP user password file (do 10 steps every time you add a FTP user: 3, 4, 5, 6, 6)

# mkdir vconf

# vi vusers

# FTP user password file, one user name and one password, similar to the following:

Ftptest

Ftptest

#

4. Generate FTP user password db library file

# db_load-T-t hash-f / etc/vsftpd/vusers / etc/vsftpd/vusers.db

5. Configure FTP user personal profile

Cd vconf

Vi ftptest (must be the same as the username of the password file above)

#

Local_root=/FTP/ftptest (root directory of the ftp user)

Write_enable=YES

Anon_world_readable_only=NO

Anon_upload_enable=YES

Anon_mkdir_write_enable=YES

Anon_other_write_enable=YES

#

6. Create a FTP user

Mkdir-p / FTP/ftptest

Chown ftptest.ftptest / FTP/ftptest

Chmod 777 / FTP/ftptest

Useradd-d / FTP/ftptest-s / sbin/nologin ftptest

Passwd ftptest

7.vi / etc/pam.d/vsftpd is added as follows:

Auth required pam_userdb.so db=/etc/vsftpd/vusers

Account required pam_userdb.so db=/etc/vsftpd/vusers

8. Turn off the firewall

Linux7:

Systemctl stop firewalld

Systemctl disable firewalld

Linux6:

Service iptables stop

Chkconfig iptables off

9. Close SELINUX

Vi / etc/selinux/config

# SELINUX=enforcing

SELINUX=disabled

Temporary shutdown:

Setenforce 0

10. Start the vsftpd service

Linux7

Systemctl restart vsftpd

Systemctl enable vsftpd

Linux6

Service vsftpd restart

Chkconfig vsftpd on

At this point, I believe you have a deeper understanding of "the method of building ftp services". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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