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

How to install and configure vsftp and build FTP in Linux

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces how to install and configure vsftp and build FTP in Linux. It is very detailed and has a certain reference value. Interested friends must read it!

Vsftp is the abbreviation of very secure ftp, and its original development idea is to build a secure ftp service. Now it is indeed a very secure and stable ftp service software, widely used as a file server in the Unix/Linux operating system.

Install vsftp

Here is a demonstration of using yum installation, which is very small, with a total size of less than 1m.

# yum install vsftpd

Open vsftp through systemctl

# systemctl start vsftpd

Configuration file for vsftp

Let's see what configuration files the software has.

# rpm-qc vsftpd/etc/logrotate.d/vsftpd/etc/pam.d/vsftpd/etc/vsftpd/ftpusers/etc/vsftpd/user_list/etc/vsftpd/vsftpd.conf

/ etc/vsftpd/vsftpd this is the main configuration file

/ etc/pam.d/vsftpd this is the configuration file related to vsftp's use of the pam module

/ etc/vsftpd/ftpusers is related to the previous configuration file and is used to restrict the login of ftp users. Let's take a look at which users are prohibited from logging in to ftp by default.

# cat / etc/vsftpd/ftpusers # Users that are not allowed to login via ftprootbindaemonadmlpsyncshutdownhaltmailnewsuucpoperatorgamesnobody

/ etc/vsftpd/user_list, the profile is related to userlist_deny in / etc/vsftpd/vsftpd. If userlist_deny=NO, the profile is not whitelisted and only users in the file are allowed to log in to ftp. If yes, it is a blacklist, and users in this file are not allowed to log in.

/ etc/logrotate.d/vsftpd, which is the rotation rule for the log files of the vsftp service.

/ etc/vsftpd/vsftpd.conf, this file is the main configuration file. Let's take a look at the important options and what they mean. Note: if this option is commented out, the feature is not enabled.

Anonymous_enable=YES: whether to allow anonymous users to log in

Local_enable=YES: whether to allow local users to log in, that is, users in the / etc/passwd file

Write_enable=YES: whether users are allowed to upload, modify or delete files

Local_umask=022: default permissions for local users to upload files

# anon_upload_enable=YES: whether anonymous users are allowed to upload files

# anon_mkdir_write_enable=YES: whether anonymous users are allowed to create directories

Xferlog_enable=YES: record the uploaded and downloaded information to / var/log/xferlog

Connect_from_port_20=YES: actively connected data transfer port

# location of xferlog_file=/var/log/xferlog:xferlog logs

# chroot_local_user=YES: restrict users to their own home directory

# chroot_list_enable=YES: when used in conjunction with the previous section, set the profile of the user to disable the hosting directory to / etc/vsftpd/chroot_list.

# chroot_list_file=/etc/vsftpd/chroot_list: create a text file / etc/vsftpd/chroot_list and write it to the user who wants to disable the fixed host directory, one per line. When chroot_list_enable=YES, the user's host directory in the chroot _ list file is disabled, while when it is NO, the user in the chroot_list file can not help fixing the host directory.

Userlist_enable=YES: whether to turn on vsftp's blocking mechanism to handle unpopular accounts. Use in conjunction with the options below.

Userlist_deny=YES: when YES, / etc/vsftpd/user_list is blacklist, NO is whitelist.

Tcp_wrappers=YES: enable the tcp_wrappers function.

These are all the contents of the article "how to install and configure vsftp and build FTP in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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