First Install openssh-server

Then add in the file : /etc/ssh/sshd_config

Subsystem sftp internal-sftper
Match group sftponly
ChrootDirectory /home/%u/ftp
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

Then the User folder should owned by root in the Bash

chown root.root /home/user

usermod -d / user

addgroup sftponly

adduser user sftponly

Then you could create a folder in

With writting rights for the group or the user.

Restart SSH