Linux installation configuration vsftp detailed configuration to build FTP

齐天大圣
Release: 2020-11-23 14:18:18
Original
3611 people have browsed it

vsftp is the abbreviation of very secure ftp. Its initial development concept is to build a secure ftp service. Now it is indeed a very safe and stable ftp service software, widely used as a file server in Unix/Linux operating systems.

Installing vsftp

Here is a demonstration of using yum to install the software. The software is very small, with a total size of less than 1M.

# yum install vsftpd
Copy after login

Open vsftp through systemctl

# systemctl start vsftpd
Copy after login

vsftp configuration file

Let’s check 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
Copy after login

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

/etc/pam.d/vsftpd This is used by vsftp The configuration file related to 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 ftp
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
Copy after login

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

/etc/logrotate.d/vsftpd, this configuration file is the rotation rule of the log file 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 their meanings. Note: If this option is commented out, it means that this 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, in the /etc/passwd file User

  • write_enable=YES: Whether users are allowed to upload, modify, and delete files

  • local_umask=022: Default permissions for local users to upload files

  • #anon_upload_enable=YES: Whether to allow anonymous users to upload files,

  • #anon_mkdir_write_enable=YES: Whether to allow anonymous users to create directories

  • xferlog_enable=YES: Record upload and download information to /var/log/xferlog

  • ##connect_from_port_20=YES: Actively connected data transmission port

  • #xferlog_file=/var/log/xferlog: xferlog log storage location

  • #chroot_local_user=YES: Restrict users to their home directory

  • #chroot_list_enable=YES: Used at the same time as the above article, set the configuration file of the user who wants to ban the host directory to /etc/vsftpd/chroot_list.

  • #chroot_list_file=/etc/vsftpd/chroot_list: Create a text file /etc/vsftpd/chroot_list and write the users who want to ban the host directory, one per line. When chroot_list_enable=YES, the user's home directory in the chroot_list file is prohibited. When it is NO, the user's home directory in the chroot_list file cannot be consolidated.

  • userlist_enable=YES: Whether to enable vsftp's blocking mechanism to deal with unpopular accounts. Use with the options below.

  • userlist_deny=YES: When it is YES, /etc/vsftpd/user_list is a blacklist, and when it is NO, it is a whitelist.

  • tcp_wrappers=YES: Enable the tcp_wrappers function.

For more related technical articles, please visit the

linux system tutorial column!

The above is the detailed content of Linux installation configuration vsftp detailed configuration to build FTP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template