你好,我在 Ubuntu Server 20.04.1 LTS 中创建了一个 vsftpd 服务器,但出现了错误,这是我的配置文件,错误信息以及我创建 SSL 密钥的人员。(抱歉我的英语太差了)
我的 vsftpd.conf 档案
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
ssl=tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_ciphers=HIGH
write_enable=YES
allow_writeable_chroot=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
systemctl status 中的错误
The error in systemctl status
● vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2020-10-02 13:50:01 UTC; 2s ago
Process: 1378 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
Process: 1391 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2)
Main PID: 1391 (code=exited, status=2)
Oct 02 13:50:01 maquinafjsmr systemd[1]: Starting vsftpd FTP server...
Oct 02 13:50:01 maquinafjsmr systemd[1]: Started vsftpd FTP server.
Oct 02 13:50:01 maquinafjsmr systemd[1]: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 02 13:50:01 maquinafjsmr systemd[1]: vsftpd.service: Failed with result 'exit-code'.
我创建密钥的命令
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem
Oct 01 15:52:26 maquinafjsmr vsftpd[3961]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 15:52:26 maquinafjsmr vsftpd[3961]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:05:57 maquinafjsmr vsftpd[4305]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:05:57 maquinafjsmr vsftpd[4305]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:09:29 maquinafjsmr vsftpd[4402]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:09:29 maquinafjsmr vsftpd[4402]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:09:34 maquinafjsmr vsftpd[4408]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:09:34 maquinafjsmr vsftpd[4408]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:09:39 maquinafjsmr vsftpd[4413]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:09:39 maquinafjsmr vsftpd[4413]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:18:38 maquinafjsmr vsftpd[4642]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:18:38 maquinafjsmr vsftpd[4642]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:18:42 maquinafjsmr vsftpd[4650]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory
Oct 01 16:18:42 maquinafjsmr vsftpd[4650]: pam_unix(vsftpd:auth): Couldn't open /etc/securetty: No such file or directory