Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-23-2011, 01:33 PM   #1
LQ Newbie
Registered: Jul 2011
Posts: 8

Rep: Reputation: Disabled
Question Chroot jail or Root jail

Is it 'chroot jail' or 'root jail'? How and when would you use such?

Old 07-23-2011, 07:00 PM   #2
Registered: Aug 2008
Location: Denmark
Distribution: Ubuntu
Posts: 58

Rep: Reputation: 18
It is "chroot jail", and it means that the user is limited to a specific directory.
The user could even be root, but it would not make any sence, since root has access to everything, and easilly could "break out" of the jail.

For example, if you want a user to be "bound" to a specific directory, you would "chroot" that user to the path.
All access to other folders will then be limited to the hard links inside that jail.
(Or soft links, if the specific software allows that)

The actual implementation depends on the software used, and the security differs between implementations.

The biggest problems people have when chrooting an application, is that all links are relative to the chrooted jail.
So, if you are chrooted to "/home/user", links to f.ex. "/var/lib/anything" will be seen as "/home/user/var/lib/anything".

Basically, that specific example could be solved with a hard link from "/var/lib/anything" to "/home/user/var/lib/anything", but as I said, there are many implementations of chroot.
Old 07-25-2011, 08:32 PM   #3
LQ Newbie
Registered: Jul 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thumbs up Chroot

Thanks for your response and explanation.
Old 07-25-2011, 08:43 PM   #4
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,691
Blog Entries: 4

Rep: Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026
The chroot command redefines what the current shell considers to be "the root directory." This makes it more difficult, but not impossible, for an application to see or to access files which do not live within the designated subtree of the "actual' file system.

Although the command is sometimes used to build a "jail," it has other useful purposes as well. If you need to run a program that, for whatever reason, needs to see its surrounding filesystem "in a certain way," this is a very easy and therefore very useful way to enable that program to run.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] chroot error "cannot change root directory to /jail: Operation not permitted" Soji Antony Linux - Newbie 8 05-23-2011 09:29 PM
[SOLVED] chroot jail problem: 'empty' jail MatrixS_Master Linux - Security 4 03-27-2010 07:25 AM
Jail and chroot rogk Linux - Security 2 10-16-2005 03:20 AM
chroot jail etc. f1uke Linux - Security 5 08-24-2005 04:12 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration