Dears,
i make a enviroment to sftp with chroot, but not work.
I try setup four users to only directory (home) with chroot but when users
with shell /bin/nologin try acess my server, the sistem closed session.
I test my enviroment with users setuped bash: /bin/bash and work fine.
Following my setup, for sftpd:
roupadd zion
mkdir -p /var/www/nabucodonosor.d && chmod 775 /var/www/nabucodonosor.d/
chown :zion /var/www/nabucodonosor.d
adduser -d /var/www/nabucodonosor.d -s /bin/false -g zion neo && echo
"P4ssw0rd" | passwd neo --stdin
adduser -d /var/www/nabucodonosor.d -s /bin/false -g zion trinity && echo
"P4ssw0rd" | passwd trinity --stdin
adduser -d /var/www/nabucodonosor.d -s /bin/false -g zion morpheus && echo
"P4ssw0rd" | passwd morpheus --stdin
adduser -d /var/www/nabucodonosor.d -s /bin/false -g zion apoc && echo
"P4ssw0rd" | passwd apoc --stdin
sftp:
[...]
Subsystem sftp internal-sftp
Match Group zion
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory /var/www/nabucodonosor.d
ForceCommand internal-sftp
[...]
--
Atenciosamente,
Rodrigo da Silva Cunha
São Gonçalo, RJ - Brasil