sftp 用户在运行 vsftpd 的 Linux 上拥有完全访问权限

sftp 用户在运行 vsftpd 的 Linux 上拥有完全访问权限

我已经使用 vsftpd 在我的 Linux 服务器上设置了 sftp,所有必需的用户权限和所有者都已设置。但是,当我在 /etc/ssh/sshd_config 中输入以下内容时,我的 ftp 连接会因管道损坏错误而失败,如果我将它们注释掉,那么我可以登录,但只能访问完整的文件系统。

Subsystem sftp internal-sftp
    Match group group-sftp-only
    ChrootDirectory %h
    ForceCommand internal-sftp

当用户“ashish”尝试连接时,系统日志显示以下内容。

May 23 11:23:00 vm-sftp systemd[1]: Started Session 111 of user ashish.
May 23 11:23:00 vm-sftp systemd[12807]: Reached target Main User Target.
May 23 11:23:00 vm-sftp systemd[12807]: Startup finished in 156ms.
May 23 11:23:00 vm-sftp systemd[1]: session-111.scope: Succeeded.
May 23 11:23:01 vm-sftp systemd[1]: Started Session 113 of user ashish.
May 23 11:23:01 vm-sftp systemd[1]: session-113.scope: Succeeded.

相关内容