Linux chroot 监狱和 FreeBSD 监狱有什么区别?
Linux chroot 监狱和 FreeBSD 监狱有什么区别?它们在现代系统中是同义词吗?一个比另一个更安全吗?是不是更灵活一点?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实上,他们几乎没有任何共同点。
Linux“chroot 环境”正是
/
解析为单个进程的环境。进程可以通过访问该树执行任何操作。所以一般来说它可以(例如)枚举系统上的其他进程,如果它是“根”进程,它仍然可以接管机器。另一方面,FreeBSD 监狱更像是虚拟机,而不是 Linux chroot 监狱。它是系统的一个分区,有自己的文件系统、用户帐户等。监狱内的root用户仅对监狱内的其他对象具有管理访问权限;它无法访问其监狱之外的任何内容。
我不会回答“更安全”或“更灵活”的问题,因为这些都是狡猾的说法。这些机制只是设计上完全不同,仅此而已。
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 (e.g.) 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.