Working under a limited access environment with chroot jail


For normal users of a GNU/Linux system, chroot command may not be quite familiar to them. Whereas explanation is totally unnecessary for people working at the server side. The term jail is used in the sense to convey the concept of limited access. chroot is commonly used to run command or interactive shell with special root directory. On installing a GNU/Linux system / is the root directory and all the programs are rooted at /. All files are accessible inside / and not from outside. Without changing the current situation we now tend to create another environment whose root directory some place other than /. This new root directory can be defined using the chroot command. For establishing such an environment first we need to find/create a empty directory as the new root directory. For instance, suppose /home/user/jail is our new root. Now,
Get into the directory
$cd /home/user/jail
Create a subdirectory named bin
$mkdir bin
Read More »