我有一个 Debian 11 虚拟机,为我的本地用户启用了 vsftpd。我想创建一个仅限 FTP 的虚拟用户(应该将其读写限制在其主目录中)。我跟着这个https://help.ubuntu.com/community/vsftpd不幸的是,这不仅不起作用,而且还破坏了我的本地用户。用户被命名,editor
但其余部分(路径等)与指南中的相同。
连接本地用户(从 Filezilla 复制,100% 确定密码正确)
Status: Connecting to 10.0.1.8:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Command: USER tomsikr
Response: 331 Please specify the password.
Command: PASS **********
Response: 530 Login incorrect.
Error: Critical error: Could not connect to server
连接虚拟用户
Status: Connecting to 10.0.1.8:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Command: USER editor
Response: 331 Please specify the password.
Command: PASS ******
Response: 500 OOPS: cannot change directory:/home/vftp/editor
Error: Critical error: Could not connect to server
/etc/vsftpd.conf
(pastebin com/9k9r3rLe)
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
virtual_use_local_privs=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
log_ftp_protocol=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
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
userlist_deny=YES
userlist_file=/etc/vsftpd.denied_users
pasv_enable=Yes
pasv_min_port=10100
pasv_max_port=10110
pam_service_name=vsftpd.virtual
guest_enable=YES
user_sub_token=$USER
local_root=/home/vftp/$USER
chroot_local_user=YES
hide_ids=YES
/etc/vsftpd.chroot_list
(仅包含我的本地用户,又名我)
tomsikr
/etc/vsftpd.denied_users
root
虚拟用户editor
位于/etc/vsftpd/vsftpd-virtual-user.db
/etc/pam.d/vsftpd.virtual
#%PAM-1.0 auth required pam_userdb.so db=/etc/vsftpd/vsftpd-virtual-user
account required pam_userdb.so db=/etc/vsftpd/vsftpd-virtual-user
session required pam_loginuid.so
任何帮助将不胜感激,因为我碰壁了。我不是 Linux 管理员,我正在即时学习