Hi!
I'm running a LAMP server on a linode360 and all are going pretty well.
For now I have only 3 sites migrated, and all of them belongs to me. But I want to move some other sites of my customers pretty soon.
So I dont want that any user (using SFTP only, ftpd not installed) can access to any path rather than their entire home directory ( i.e. /home/user1 ).
I Googled this topic and I found a lot of info, but all is pretty old

and not sure about what method can be more secure (i.e. when doing reconfigure for scponly it says that can be a root exploit hole!).
I found
http://www.minstrel.org.uk/papers/sftp/builtin/ and I think that this will be a good and easy method. So I did the following:
I have added this to /etc/ssh/sshd_config
Code:
# Use the following line to *replace* any existing 'Subsystem' line
Subsystem sftp internal-sftp
# These lines must appear at the *end* of sshd_config
Match Group sftponly
ChrootDirectory %h
ForceCommand internal-sftp
AllowTcpForwarding no
And after make these changes to existing user:
Code:
usermod -G sftponly user1
usermod -s /bin/false user1
The second part is working fine, now the user1 can only do SFTP, and cant access to SSH shell.
But the first part is not working as expected

because the
ChrootDirectory %h directive makes the user being disconnected from SFTP

I tried with
/home/%u but still the same.
If I deactived the
ChrootDirectory %h line, then the user can connect again to SFTP, but cant access to other users home too
Please, can someone help me?
By the way, I'm using Debian 5.0 as deployed by Linode and openssh from Debian repository.