-   Linux - General (
-   -   what is chroot ? (

sixth_sense 05-02-2004 03:45 PM

what is chroot ?

on some documentation i m getting a word "chroot" "chroot in jail" - what is these ? I really wanna know. I tried man chroot but didn't understand anything.

plz clearfy me.


slakmagik 05-02-2004 03:50 PM

This may not be the most brilliant explanation, but it'll probably do: chroot CHanges the ROOT to a subdirectory of the actual root directory, preventing you from accessing anything outside it. (It has other uses, but it's still a similar concept.)

sixth_sense 05-03-2004 04:24 AM

Thanks ;

so; the concept like, forwarding someone to a perticular sub directory...simulating like its the root directory.. huh ?? Any idea about "in jail"

Actually i got them on postfix documentation.


jschiwal 05-03-2004 05:04 AM

If you had to repair your linux installation, and booted up with a rescue boot disk, you could use chroot to change from the present root directory in ram disk to the disk partition that is normally your root directory.

Another use is to run services like apache from a different root. This way, if it crashes, your system isn't exposed. The new root dir will contain a scaled down copy of the system heirarchy. Just what is needed to run the service but no more. You may also use the --restricted option for the bash shell.

sixth_sense 05-03-2004 08:58 AM

Thanks for the information. ill knock again for any further assistance :)

All times are GMT -5. The time now is 04:14 PM.