LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-23-2011, 12:33 PM   #1
bayprince
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?

Thanks
 
Old 07-23-2011, 06:00 PM   #2
SciFi-Bob
Member
 
Registered: Aug 2008
Location: Denmark
Distribution: Ubuntu
Posts: 62

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, 07:32 PM   #3
bayprince
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, 07:43 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
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.
  


Reply


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 08:29 PM
[SOLVED] chroot jail problem: 'empty' jail MatrixS_Master Linux - Security 4 03-27-2010 06:25 AM
Jail and chroot rogk Linux - Security 2 10-16-2005 02:20 AM
chroot jail etc. f1uke Linux - Security 5 08-24-2005 03:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:58 PM.

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