FTP 연결을 할 때 알아야 할 프로토콜 연결이 있습니다.
이러한 연결은 사용자의 방문에 응답하며 현재 사용자가 인증 될 때 활성화됩니다.
FTP에서는 수동 모드가 활성화되어 있지 않으면이 오류가 발생합니다.
아래 구성 파일은 vsftpd 소프트웨어에 따라 구성되며 모든 설정이 올바르게 구성되고 동시에 오류가 없습니다.
활성, 수동 모드 및 방화벽 포트를 허용합니다. 2000에서 2500 / TCP
pasv_enable=Yes
pasv_max_port=2500
pasv_min_port=2000
% 100 고정 Vsftpd 구성 파일 : /etc/vsftpd/vsftpd.conf
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=NO
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
#xferlog_file=/var/log/xferlog
#
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES
pam_service_name=vsftpd
pasv_enable=Yes
pasv_max_port=2500
pasv_min_port=2000
tcp_wrappers=YES
이러한 설정을 모두 마치면 방화벽 설정을 구성해야합니다.
- TCP 수신 : 2000 ~ 2500 및 21
- TCP 발신 : 2000 ~ 2500 및 21
루트 액세스에는 ftp : //를 사용할 수 없습니다. 루트에 액세스하려면 sftp : //를 사용해야합니다.
FTP 새 계정 추가 :
- adduser newftpuser
- passwd newftpuser
기본 ftp 폴더 :