To ensure that SFTP does not complain with fatal: bad ownership or modes for chroot directory component "/var/www/", we have to make sure the permissions are the following:
➜ ls -ld /var/www
drwxr-xr-x+ 24 root root 4096 Aug 16 15:39 /var/www
➜ getfacl /var/www
getfacl: Removing leading '/' from absolute path names
# file: var/www
# owner: root
# group: root
user::rwx
group::r-x
group:all_users:---
mask::r-x
other::r-x
To ensure that SFTP does not complain with
fatal: bad ownership or modes for chroot directory component "/var/www/"
, we have to make sure the permissions are the following: