概述
vsftpd 配置-掉坑记
教程来源
linux公社
–更改前–
listen=NO
listen_ipv6=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
#local_umask=022
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES
#chown_username=whoever
#xferlog_file=/var/log/vsftpd.log
#xferlog_std_format=YES
#idle_session_timeout=600
#data_connection_timeout=120
#nopriv_user=ftpsecure
#async_abor_enable=YES
#ascii_upload_enable=YES
#ascii_download_enable=YES
#ftpd_banner=Welcome to blah FTP service.
#deny_email_enable=YES
(default follows)
#banned_email_file=/etc/vsftpd.banned_emails
chroot_list_enable below.
#chroot_local_user=YES
#chroot_local_user=YES
#chroot_list_enable=YES
(default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#ls_recurse_enable=YES
Customization
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
utf8_filesystem=YES
#############################################################################################
userlist_file=/etc/vsftpd.user_list
userlist_enable=YES
userlist_deny=NO
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
错误演示
root@bananapi:/home/hyqf# service vsftpd status
● vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-08-02 15:27:21 UTC; 3min 4s ago
Process: 5992 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
Process: 5993 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2)
Main PID: 5993 (code=exited, status=2)
Aug 02 15:27:21 bananapi systemd[1]: Starting vsftpd FTP server…
Aug 02 15:27:21 bananapi systemd[1]: Started vsftpd FTP server.
Aug 02 15:27:21 bananapi systemd[1]: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 02 15:27:21 bananapi systemd[1]: vsftpd.service: Failed with result ‘exit-code’.
Aug 02 15:27:23 bananapi systemd[1]: vsftpd.service: Unit cannot be reloaded because it is inactive.
##################################################################################################
正确
修改后
listen=YES
#listen_ipv6=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
#local_umask=022
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES
#chown_username=whoever
#xferlog_file=/var/log/vsftpd.log
#xferlog_std_format=YES
#idle_session_timeout=600
#data_connection_timeout=120
#nopriv_user=ftpsecure
#async_abor_enable=YES
#ascii_upload_enable=YES
#ascii_download_enable=YES
#ftpd_banner=Welcome to blah FTP service.
#deny_email_enable=YES
(default follows)
#banned_email_file=/etc/vsftpd.banned_emails
chroot_list_enable below.
#chroot_local_user=YES
#chroot_local_user=YES
#chroot_list_enable=YES
(default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#ls_recurse_enable=YES
Customization
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
utf8_filesystem=YES
#############################################################################################
userlist_file=/etc/vsftpd.user_list
userlist_enable=YES
userlist_deny=NO
++++++++++++++++++++++++++++++++++++++++++++
root@bananapi:/home/hyqf# service vsftpd start
root@bananapi:/home/hyqf# service vsftpd status
● vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-08-02 15:30:37 UTC; 1s ago
Process: 6031 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
Main PID: 6032 (vsftpd)
Tasks: 1 (limit: 2135)
Memory: 440.0K
CGroup: /system.slice/vsftpd.service
└─6032 /usr/sbin/vsftpd /etc/vsftpd.conf
下次记得注释掉ipv6选项
最后
以上就是苗条酸奶为你收集整理的vsftpd 配置-掉坑记(default follows)chroot_list_enable below.(default follows)Customization(default follows)chroot_list_enable below.(default follows)Customization的全部内容,希望文章能够帮你解决vsftpd 配置-掉坑记(default follows)chroot_list_enable below.(default follows)Customization(default follows)chroot_list_enable below.(default follows)Customization所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复