Why is "chroot" never used on Mac OS X?

53

Solution 1

There are two main categories of uses for chroot (the Wikipedia article goes into more detail):

  • Isolate an application, providing it with a restricted view of the filesystem. This is commonly done for public FTP servers, for example, to make sure they won't be able to serve files outside the public area even if there's a bug in the server software. This use case is getting less and less common for two reasons. First, chroot doesn't provide much isolation, a vulnerability in the server could allow the attacker do do damage in many other ways than accessing files. Second, virtual machines, which do provide stronger isolation, have become a lot cheaper, and often are easier to set up, so they are the natural choice.
  • Run software in a different operating system with the same kernel but different libraries. For example, as suggested by David Cournapeau, if you're developing software, have a lot of extra stuff installed, and want to make sure your software doesn't depend on that extra stuff, you might test it in a chroot with only a minimal installation. Or (but I don't think that's very common for OSX systems) you might run a different OS release — for example I have a 64-bit Linux system which has a 32-bit distribution accessible with chroot, for those rare times when I need to run a 32-bit application that won't run directly on the main system.

Both kinds of use cases are rather specialized. Chroot is useless to most people; it's there because it's useful to some, and it's very cheap to implement.

Solution 2

I use chroot on mac os x to test some softwares, or to test packaging of projects I am involved with (to e.g. test installs on 10.4 while I am using 10.6).

Solution 3

How often do people want to open up their personal systems for others to access? Most of the time, chroot is geared towards servers with lots of different users. However, if you wanted to indeed setup a local SFTP server for users to access your personal system, then you should definitely chroot it.

Maybe this post will start you off in the right direction:

http://hints.macworld.com/article.php?story=2004110314282345

Share:
53

Related videos on Youtube

Colour
Author by

Colour

Updated on September 18, 2022

Comments

  • Colour
    Colour almost 2 years

    If I have to sort one list and merge it with another already sorted one. Then what will the running time be if I use merge sort and insertion sort? Merge sort is: n logn Insertion sort is: n^2 But together they are?

    EDIT: Oh, so what I actually meant was that I had to sort one of the lists and merge them together. I have made the pseudocode for the insertion sort, but I don't know what the running time of the two algorithms will be. http://gyazo.com/0010f053f0fe64a82dad1dd383740a3f

    • Kevin
      Kevin over 9 years
      I don't think merge sort applies here. "merge" and "merge sort" are two different things.
    • Zim-Zam O'Pootertoot
      Zim-Zam O'Pootertoot over 9 years
      Please provide some pseudocode of what you're trying to do
  • Colour
    Colour over 9 years
    I understand it now. Thanks! My problem was that I didn't understand how the running time of insertion sort and merging could be O(n+m^2) :). Thanks!