Linux CentOS – Restrict Users to Their Home Directory

centoschrootlinux

How do I restrict the user to his current directory only?

I tried the steps mentioned on this page to configure rssh chroot jail to lock users to their home directories only, but this looks too complicated. Is there an easier way?

Best Answer

I use Jailkit at $work, and it takes only a few commands. They even provide a chroot shell howto. The hardest part about maintaining a chroot for your users is copying in the libraries and binaries they need to run programs. The jk_cp command takes care of copying in dependencies.