bad ownership or modes for chroot directory component

From the man page:

ChrootDirectory
Specifies the pathname of a directory to chroot(2) to after
authentication. All components of the pathname must be root-owned
directories that are not writable by any other user or
group
. After the chroot, sshd(8) changes the working directory
to the user’s home directory.

My guess is one or more of the directories on the path do not meet those requirements (my suspicion is www is owned or writable by your web user, not root).
Go back and follow the directions, ensuring that the requirements above in bold italics are met.

Leave a Comment