[CentOS] FTP accounts

Mon Mar 14 17:32:17 UTC 2011
Josh <hawk82 at gmail.com>

On Mon, Mar 14, 2011 at 1:27 PM, Huib Laurens <sterkebak at gmail.com> wrote:
> Hello,
>
> I have setup a centos server running 5.5 and I have a problem with the FTP
> settings.
>
> Currently I have two FTP accounts based on that server, they lead to:
>
> /home/bella
> /home/carmen
>
> Currently the FPT accounts starts in the home directory when they are logged
> in. But they are able to see all directories on the server. What can I do to
> make sure they cant come out of there home directory?
>
> --
> Regards,
> Huib "Abigor" Laurens
>
>
>
> Support Free Knowledge: http://wikimediafoundation.org/wiki/Donate
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>

It depends on the FTP server software you use. If you are using VSFTP,
then you want to add or uncomment the following line in
/etc/vsftpd/vsftpd.conf
chroot_local_user=YES
Save the changes. Restart VSFTPD. This will jail the user to their
home directory.
Taken from: http://centoshacker.com/kabir/remove-access/creating-a-chroot-jail-enabled-ftp-service.html

If you use ProFTPD (which is what I use), then follow this guide:
http://www.proftpd.org/docs/howto/Chroot.html

Josh