Vsftpd passive mode and Active Mode

Source: Internet
Author: User
Tags ftp site ftp access

Vsftp files and directories
Main Program of/usr/sbin/vsftp
/Etc/rc. d/init. d/vsftp Startup Script
/Etc/vsftpd. conf vsftp configuration file
/Etc/pamd/vsftpd PAM Authentication File
/Etc/vsftpd. ftpuser prohibit ftp users
/Etc/vsftpd. user_list list of users that are prohibited or permitted to use ftp

/Var/FTP Anonymous home directory
/Varftp/pub FTP Anonymous upload main directory


Start vsftp
Standalone Mode
Used for environments with frequent ftp access. The vsftp process always runs the listening port.
Service vsftp START | stop | restart | status
/Etc/rc. d/init. d/vsftpd START | stop | restart
Or add Listen = yes to/etc/vsftpd. conf to run with standalone.
Run in the inet. d daemon
Used to run vsftp In the inet. d daemon when FTP traffic is small
Run the script in/etc/inet. d/vsftp.


Vsftp configuration file/etc/vsftpd. conf

Active Mode settings
Port_enable = Yes enable active mode
Connect_from_port_20 = yes whether to enable the default port 20 listener when active mode is enabled
Ftp_date_port = % portnumber % the previous option uses the No parameter to specify the data transmission Port

Passive Mode
Pasv_enable = Yes enable Passive Mode
Pasv_min_port = % Number % passive mode lowest Port
Pasv_max_port = % Number % maximum port in passive mode

Anonymous upload settings
Anonymous_enable = Yes enable Anonymous Account
Anon_world_readable_only = No disable anonymous global browsing
Anon_upload_enable = Yes anonymous upload Enabled
Anon_mkdir_write_enable = Yes allows anonymous users to create directories
Write_enable = yes. The global write permission is enabled.


Restrict local users to access the file system
Chroot_local_user = Yes restrict local user browsing to its FTP root directory

Restrict some users to access the file system
Chroot_list_enable = Yes enable list (it cannot be enabled together with the previous command)
Chroot_list_file = % file path % restrict user list files

Connection restrictions
Max_client = % Number % maximum number of connections
Max_per_ip = % Number % maximum number of connections per IP
Anon_max_rate = % Number % anonymous user maximum rate unit: kbit/s
Local_max_rate = % Number % Local User Maximum rate unit: kbps

User_config_dir = % file path %/% username % set the connection rate for different users

% Username % file content: local_max_rate = % Number %


User home directory settings

The local user's home directory is defined in the/etc/passwd file.
FTP user: ________ is the definition line.

The FTP home directory for global redirection of localuser
Local_root = % PATH %

Security Settings
Hide_ids = Yes hides the UID and gid of a user.

Change Original banner
Ftpd_banner = % message %
Or
Banner_file = % file path %

Virtual FTP site settings
First, create two conf files.
# Cp/etc/vsftpd. CONF/etc/vsftp/vsftp2.conf
Create a home directory for ftp2
# Mkdir/var/ftp2
# Useradd-D/var/ftp2-M ftp2

# Service vsftpd restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.