Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to limit certain users on my system to a subset of commands and have absolutely no access to the rest of the system. I figure chrooting is the way to solve this but I only know how to chroot a ftp user. Can this be done for normal shell users and how can I achieve this?

share|improve this question
up vote 6 down vote accepted

Jailkit simplifies it.

Jailkit is a set of utilities to limit user accounts to specific files using chroot() and or specific commands. Setting up a chroot shell, a shell limited to some specific command, or a daemon inside a chroot jail is a lot easier and can be automated using these utilities.

share|improve this answer

Please use chroot with extreme caution, it's well known that it doesn't provide the complete protection it seems to.

chroot limitations from wikipedia

I remember a debate on the LKML about fixing "bugs" in chroot that allowed users to escape; kernel developers have answered that chroot is not intended to be a security mechanism.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.