chroot an user sftp

Hi,

I have a server with an ssh server on my CSS.

I have created an user, and i would like that this user see only his /home with filezilla.

What do i do ?

And if I connect with an other user, or the same, and i do “su” command, to have root privileges, root will not chrooted ?

Thanks for details :wink:

The sftpuser is named “taki”
/var/log/messages :

Feb 24 13:00:56 oxygen sshd[24452]: SSH: Server;Ltype: Version;Remote: 192.168.1.13-50645;Protocol: 2.0;Client: PuTTY_Local:_Jan__9_2012_11:57:02
Feb 24 13:00:56 oxygen sshd[24452]: SSH: Server;Ltype: Kex;Remote: 192.168.1.13-50645;Enc: aes256-ctr;MAC: hmac-sha1;Comp: none [preauth]
Feb 24 13:00:57 oxygen sshd[24452]: SSH: Server;Ltype: Authname;Remote: 192.168.1.13-50645;Name: taki [preauth]
Feb 24 13:00:57 oxygen sshd[24452]: PAM unable to dlopen(/lib/security/pam_ck_connector.so): /lib/security/pam_ck_connector.so: cannot open shared object file: No such file or directory
Feb 24 13:00:57 oxygen sshd[24452]: PAM adding faulty module: /lib/security/pam_ck_connector.so
Feb 24 13:00:57 oxygen sshd[24452]: Accepted keyboard-interactive/pam for taki from 192.168.1.13 port 50645 ssh2
Feb 24 13:00:57 oxygen sshd[24452]: pam_unix(sshd:session): session opened for user taki by (uid=0)
Feb 24 13:00:57 oxygen sshd[24455]: fatal: bad ownership or modes for chroot directory "/home/taki"
Feb 24 13:00:57 oxygen sshd[24452]: pam_unix(sshd:session): session closed for user taki

/etc/ssh/sshd_config

 # override default of no subsystems
#Subsystem      sftp    /usr/lib/misc/sftp-server
Subsystem   sftp    internal-sftp

<...>
Match user taki
   ForceCommand internal-sftp
   ChrootDirectory /home/taki