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

Method and steps for CentOS 6.8 to install vsftpd

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

Share

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

Vsftpd, which stands for "very secure FTP daemon", is a completely free, open source ftp server software.

Vsftpd is one of the most respected FTP server programs in Linux distributions. It is small and light, safe and easy to use, supports virtual users, supports bandwidth restrictions and other functions.

System environment: CentOS 6.8 64-bit

Vsftpd version: vsftpd-2.22-21.el6.x86_64

1. Execute a command

Yum-y install vsftpd

Ps: (1) whether to use sudo permission to execute depends on the specific environment; (2) rpm-qa | grep vsftpd can check whether vsftpd; is installed. (3) the default configuration file is in / etc/vsftpd/vsftpd.conf.

two。 Create a new folder under the following directory: / product/ftpfile/

3. Add an anonymous user ftpuser, command:

Sudo useradd ftpuser-d / product/ftpfile-s / sbin/nologin

4. Modify the permissions of the file ftpfile, command:

Sudo chown-R ftpuser.ftpuser. / ftpfile/

5. To reset the password for ftpuser, command:

Sudo passed ftpuser

6. Go to the / etc/vsftpd directory, create a new file chroot_list, and add the following content: ftpuser:

Add the virtual user ftpuser you just created to this profile, which will be referenced later.

7. Create a new file index.html under the ftpfile folder and enter the following:

This is a ftpfile demo/ftpfile

8. Open the file in the / etc/vsftpd directory: vsftpd.conf, and modify or add the following configuration:

Local_root=/product/ftpfile#chroot_local_user=YESanon_root=/product/ftpfileuse_localtime=YES# Anonymous # anonymous_enable=YESanonymous_enable=NO#pasv_enable=YESpasv_min_port=61001pasv_max_port=62000

9. Add configuration to the firewall:

Firewall location:

Add configuration:

# vsftpd-An INPUT-p TCP-- dport 61001 ACCEPT-An OUTPUT 62000-j ACCEPT-An OUTPUT-p TCP-- sport 61001V 62000-j ACCEPT-An INPUT-p TCP-- dport 20-j ACCEPT-An OUTPUT-p TCP-- sport 20-j ACCEPT-An INPUT-p TCP-- dport 21-j ACCEPT-An OUTPUT-p TCP-sport 21-j ACCEPT

Restart the firewall:

Sudo service iptables restart

Restart vsftpd:

Sudo service vsftpd restart

Ps: when you start Shutting down vsftp for the first time, ignore failed, because this is a restart command. Ensuring that Starting vsftpd is OK means that the vsftpd service is successful.

10. Modify the security group policy: sudo vi / etc/selinux/config, check to make sure SELINUX=disabled.

To avoid a 550 access denial error in validation, enter the command:

Sudo setsebool-P ftp_home_dir 1

11. Browser launch: ftp://120.77.86.200, enter the user name ftpuser and password xxx:

Common commands:

Sudo service vsftpd start # start sudo service vsftpd stop # shut down sudo service vsftpd restart # restart

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

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