[CentOS-pt-br] SFTP with chroot

Rodrigo Cunha rodrigo.root.rj em gmail.com
Domingo Junho 16 23:44:10 UTC 2019


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
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://lists.centos.org/pipermail/centos-pt-br/attachments/20190616/a76a7071/attachment.html>


Mais detalhes sobre a lista de discussão CentOS-pt-br