Here's the commands you need:
usermod -d /var/www/ sftponly
usermod -s /sbin/nologin sftponly
usermod -s /bin/false sftponly
After this best way to give permissions for any user to any folder is ACL:
setfacl -Rm "u:sftponly:rwx" /var/www/
setfacl -Rdm "u:sftponly:rwx" /var/www/
Then enjoy your life