vsftp:不允许 ftp 用户在目录树中向上移动

Gar*_*rry 3 permissions users vsftpd

我在 Ubuntu 14.04 上使用 vsftp 并使用以下命令创建了一个用户:

sudo adduser ftpuser --home /var/www/wp-content/uploads
Run Code Online (Sandbox Code Playgroud)

用户有权查看/var/www/wp-content/uploads ,但该用户还能够在目录结构中向上移动,这样他们就可以在看到内容/var/www和也/var/

用户不能编辑这些,因为他们不是这些文件的所有者,这很好,但是有什么方法可以阻止用户更改目录?

Cha*_*Rex 5

根据此答案,您需要编辑/etc/vsftpd.conf并确保存在以下行:

chroot_local_user=YES
Run Code Online (Sandbox Code Playgroud)