ChrootDirectory is tricky > <
As I google for it and found the ChrootDirectory setting explanation (http://en.wikibooks.org/wiki/OpenSSH/Cookbook/SFTP)
It say " Depending on the opensshd version this may not be usable since some versions require that the chroot-target directory and all parent directories are owned by root and not writeable by any others. "
so in this explanation when I set like this :
drwxr-sr-x 3 root sftp 4096 Mar 9 15:14 www
If I set
root:sftp (chmod is 755) it can use sftp to connect to my /var/www but it don't have writable/deletable permission.
but set www to
chmod is 775 can't connect
and this is my user that I want it to control /var/www (It's in the sftp group):
I set this bottom in my sshd_config :
Subsystem sftp internal-sftp Match group sftp X11Forwarding no ChrootDirectory /var/www AllowTcpForwarding no ForceCommand internal-sftp
change mod to 775 can't connect >"<
so how can I resolve this problem?
I want my group sftp can have chmod 775 in the /var/www . Can anyone help me?