I'm trying to get sftp working with proper chroot configuration on Centos 6.5 server. As for now I get:
sftp email@example.com User@000.000.000.000's password: Write failed: Broken pipe Couldn't read packet: Connection reset by peer
In /var/log/messages I get:
Connection from 000.000.000.000 port 52365 Accepted password for User from 000.000.000.000 port 52365 ssh2 User child is on pid 0000 fatal: bad ownership or modes for chroot directory component "/"
User section in /etc/ssh/sshd_config:
Match User User X11Forwarding no AllowTcpForwarding no ChrootDirectory /sftp/user
Both /sftp and /sftp/user are set to root:root and 755. As I understand error message, chroot tries to use "/" as directory, instead of "/sftp/user". Why is it so? What may I do to fix it? Thanks for any ideas.