Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 need an absolutely minimal chroot environment that only has a few commands to handle files & directories. No usermanagment or such. Since I want to create such an environment for every of my users, it must be really, really small.

Are there any prebuilt environments that fit my needs an are 5-10 MB (or as small as possible) ?

Or are there alternative ways to limit a user to a directory and to only a few commands?

Thanks for your help!

share|improve this question

This script may come in handy.

looks like just enough to upload, download, rsync files, etc.

I think you will then have to implement quotas to keep them from using too much disk space.

share|improve this answer

FreeBSD jails.

In Linux, there is OpenVZ and hypervisors (Xen, KVM) - they are used to provide VPS hosting solutions. The latter does not fit into 5-10 MB, however.

And if you just want file operations (not running external processes), it may be a good idea to write your own shell and filter command arguments by regular expressions. It would be under 200 lines of Google Golang code, I think.

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.