简体   繁体   中英

What's the difference between a Linux chroot jail and a FreeBSD jail?

What's the difference between a Linux chroot jail and a FreeBSD jail? Are they synonyms in modern systems? Is one more secure than the other? Is one more flexible?

Actually, they have almost nothing in common.

A Linux "chroot environment" is just what / resolves to for a single process. Anything the process can do with access to that tree, it can do. So in general it can (eg) enumerate other processes on the system, and if it is a "root" process, it can still take over the machine.

A FreeBSD jail, on the other hand, is more like a virtual machine than a Linux chroot jail. It is a partition of the system with its own file system, user accounts, etc. The root user inside the jail only has administrative access to other objects in the jail; it cannot access anything outside of its jail.

I will not respond to the "more secure" or "more flexible" questions since those are weasel words. The mechanisms are just completely different by design, that's all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM