小编Lui*_*ela的帖子

致命:SFTP 中 chroot 目录组件“/”的所有权或模式错误

我一直在尝试在 debian 服务器中配置 sftp。sshd_config:

Subsystem sftp internal-sftp

UsePAM no

Match User sftpUser
ChrootDirectory /users/sftp/sftpUser
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
Run Code Online (Sandbox Code Playgroud)

目录:

 drwxr-xr-x   3 root      root      4096 Oct 20 10:59 users

 drwxr-xr-x   3 root      root      4096 Oct 20 11:00 sftp

 drwxr-xr-x   2 root      root      4096 Oct 20 11:00 sftpUser
Run Code Online (Sandbox Code Playgroud)

cat /var/log/auth.log

Oct 20 10:58:22 w1 sshd[24634]: Accepted password for sftpUser from 201.156.103.213 port 34106 ssh2
Oct 20 10:58:22 w1 sshd[24636]: fatal: bad ownership or modes for chroot directory component "/" …
Run Code Online (Sandbox Code Playgroud)

debian ssh sftp

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

debian ×1

sftp ×1

ssh ×1