‹ BackHN Continuity

Thread

Updates to Full Disk Access in macOS

309 points · 219 comments · notfirstpost

  1. moecables · · focus · HN ↗
    IMHO, it's good to add more specific controls for this. After reading this, I went and checked my list of app with full disk access:

    - Ghostty (fine, it's my terminal)

    - Alfred (fine, I use it for searching everywhere)

    Then I have a few turned off:

    - Spotify (why does it need full disk access) ??

    - Gemini (nope, don't need it to know everything about my computer)

    1. 0c3ca83 · · focus · HN ↗
      - Ghostty (fine, it's my terminal)

      But your terminal shouldn't be accessing any files; you just need to be able to launch /bin/zsh or whatever you use as your shell. The shell needs to be able to access files, but its container doesn't.

      Of course, you could go farther. For example, on OpenBSD, even /bin/ksh has been somewhat sandboxed; it can see most of the file system, but the things it can do have been limited:

        if (pledge("stdio rpath wpath cpath fattr flock getpw proc "
            "exec tty id", NULL) == -1) {
      1. saagarjha · · focus · HN ↗
        macOS attributes shell commands to their parent app bundle.
        1. 0c3ca83 · · focus · HN ↗
          That seems like a massive hole in the model that would make it very hard to lock down multi-process/privsep programs like sshd.
          1. saagarjha · · focus · HN ↗
            Sandboxing something like that is challenging, yes. But probably not for this reason you can always disclaim responsibility for your process.
            1. 0c3ca83 · · focus · HN ↗
              It really isn't; the program just needs to be able to declare what it expects it should be able to do, and what it expects its children should be able to do. The latter doesn't need to be a subset of the former.
              1. dcrazy · · focus · HN ↗
                That “just” is doing a LOT of work.
                1. 0c3ca83 · · focus · HN ↗
                  It's already done on OpenBSD, and linux has the pieces to do it, though it's far more fragile and complicated. I'm not speaking hypothetically here, I've implemented code that works this way.
                  1. dcrazy · · focus · HN ↗
                    You are minimizing the difference in scope between the audience and applications of OpenBSD and those of macOS.

                    macOS has had a capabilities model for over a decade called App Sandboxing. It would be entirely impractical to expect app authors to correctly declare their permissions up front and for users to audit them. Hence the permissions granted to sandboxed apps are pre-determined by the OS, and can be extended through explicit user interaction.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.