Where do I begin with this question? First off, and please don't take offense to this but IMHO I would think that this question is a little advanced for being posted on a Newbie forum and would probably be better addressed under the Software forum. Although, the manner in which it was asked makes me waiver in my opinion on the matter as it is a somewhat more advanced question that was asked in a bit too much of a simple manner. You have stated that you have setup a sftp server on CentOS (I am presuming vsftp) and that everything is working accept user are able to see the root directory. Luckily, I have come across this problem before and I would like to help. The problem it that you have not given much information about your configuration, which leaves some questions that I can only presume the answers to for now. (Pertinent information would include uncommented lines in your vsftpd.conf $grep -v "^#" /etc/vsftp/vsftpd.conf ) For the sake of argument I will presume that you are wanting to setup a secured sftp server rather than a ftp or ftps server given by the fact you are mentioning Openssh as part of your configuration and the other two (ftp,ftps) do not use Openssh( I will retouch on this later). I will also presume that your configuration is disallowing anonymous login and thus using local account authentication. The last assumption I will make is that users are being chrooted after login ( If this is not the case then I would look into this as this is the prefered way to restrict access to parent directories outside of the chroot jail setup for the user). The issue with this is that chrooting for sftp on CentOS does not work properly as the version of Openssh supplied with CentOS does not support chrooting through ssh connections and therein lies the problem. Luckly there is a solution for this, and a few troubleshooting steps that I could suggest.
1. Is vsftp configured in the manner I have described? (local user authencation, chroot jail)
2. Check the version of Openssh. ($rpm -qa openssh) chrooting was not added until version 5.x
3. Does the chroot functionality work properly if you disable sftp in the vsftp configuration?
If these three steps are correct then you will likely need to install Openssh 5.x on your system. This leaves two options:
1) find a precomplied binary package for CentOS 5.2 (good luck, I have already checked dag weeirs and rpmforge with no such)
2) build your own rpm package using the following fantastic guide http://binblog.info/2009/02/27/packa...ssh-on-centos/
and while you're there checkout this article which discusses precisely this topic http://binblog.info/2008/04/06/opens...or-webhosting/
Hope this was helpful and as always,