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 restrict a user to a particular home directory. I don't want the user to have read access to the system resources etc. or to other user's homes. Can someone can suggest possible ways of doing that?

When I use jailkit I get the error:

an error " ldconfig: Can't open configuration file /etc/ No such file or directory "

when I use the commands:

sudo jk_init -v /jail basicshell

sudo jk_init -v /jail ssh

share|improve this question

migrated from Jan 30 '12 at 6:28

This question came from our site for professional and enthusiast programmers.

You will need to allow read access to /etc/ in your confinement system so that dynamic libraries load correctly. You will need to grant read access to the usual /lib, /usr/lib, etc. directories and many of the files within these directories for most usual shell programs to function. And, you'll need to grant access to all the programs from /bin, /usr/bin, /sbin, and /usr/sbin that you want your users to have access to.

What's far more important than the programs they can execute are the files they can read and write.

share|improve this answer
I was doing the configuration with root user . So i have the read/write access to these files/directories. – user108787 Jan 30 '12 at 7:02
Please note that you need access to the directories/files INSIDE the jail, outside access is not enough. – Kimvais Jan 30 '12 at 8:39

Your Answer


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