到目前为止,我一直无法将FTP用户保留在其网站目录中。是否有一种解决方案既可以修复此错误,又可以将用户监禁在其目录中?
我更改的vsFTPd设置:
listen_port=9000
Set: anonymous_enable=NO
Uncomment: local_enable=YES
Uncomment: write_enable=YES
Uncomment: local_umask=022
Set: connect_from_port_20=NO
Uncomment: idle_session_timeout=600
Uncomment: data_connection_timeout=120
Comment out: #ftpd_banner=Welcome to blah FTP service. [should be on line 104]
Added: banner_file=/etc/issue.net
Uncomment: chroot_local_user=YES
Uncomment: chroot_local_user=YES
Uncomment: chroot_list_enable=YES
Uncomment : chroot_list_file=/etc/vsftpd.chroot_list
在文件末尾,我添加了:
# Show hidden files and the "." and ".." folders.
# Useful to not write over hidden files:
force_dot_files=YES
# Hide the info about the owner (user and group) of the files.
hide_ids=YES
# Connection limit for each IP address:
max_per_ip=10
# Maximum number of clients:
max_clients=5
# FTP Passive Settings
pasv_enable=YES
#If your listen_port is 9000 set this range to 7500 and 8500
pasv_min_port=[port range min]
pasv_max_port=[port range max]
有问题的用户mybloguser
被监禁到她/他的网站目录下/srv/www/myblog
,该用户不属于nano /etc/vsftpd.chroot_list
文件。用户的主目录也是/srv/www/myblog
过去使用过的目录。
我尝试了allow_writeable_chroot=YES
无效的解决方案,实际上完全破坏了vsFTPd。
我试过了:
我们如何才能解决此错误并使用户进入其主目录呢?
allow_writeable_chroot=YES
就足够了,并且实际上可以“按预期”运行FWIW ...