您好,欢迎访问宜昌市隼壹珍商贸有限公司
400 890 5375在Debian系统中,通过使用vsftpd(Very Secure FTP Daemon),可以轻松实现对FTP访问的控制。
sudo apt-get update sudo apt-get install vsftpd
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.orig
sudo nano /etc/vsftpd.conf
local_enable=YES write_enable=YES chroot_local_user=YES allow_writeable_chroot=YES
anonymous_enable=NO
# 允许IP地址为192.168.1.1的客户端连接 tcp_wrappers=YES hosts_allow=192.168.1.1
userlist_enable=YES userlist_file=/etc/vsftpd.userlist userlist_deny=NO
sudo nano /etc/vsftpd.userlist
在此文件中输入被允许访问的用户名,每行一个。
sudo systemctl restart vsftpd
至此,vsftpd将按照您的设定进行访问限制。请注意,根据实际需求可能需要进一步调整相关设置,并在正式应用前进行充分测试。