Revision history for chroot


Revision [32634]

Last edited on 2019-09-07 12:39:27 by Darry
Additions:
Definition: A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normally cannot access) files outside the designated directory tree. The term "chroot" may refer to the chroot(2) system call or the chroot(8) wrapper program. The modified environment is called a chroot jail.
A chroot jail is a way to isolate a process and its children from the rest of the system.
The idea is that you create a directory tree where you copy or link in all the system files needed for a process to run. You then use the chroot() system call to change the root directory to be at the base of this new tree and start the process running in that chroot'd environment. Since it can't actually reference paths outside the modified root, it can't perform operations (read/write etc.) maliciously on those locations.
On Linux, using a bind mounts is a great way to populate the chroot tree. Using that, you can pull in folders like /lib and /usr/lib while not pulling in /usr, for example. Just bind the directory trees you want to directories you create in the jail directory.
https://unix.stackexchange.com/questions/105/chroot-jail-what-is-it-and-how-do-i-use-it
Deletions:
PostPosted: Sat 24 Aug 2019, 18:58 Post subject: Reply with quote


Revision [32633]

The oldest known version of this page was created on 2019-09-06 15:50:43 by Darry
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki