This is exactly it. Unix is a multi-user system trying to cope in a single-user world and it's not working. The Unix threat model is students on a university mainframe trying to break into each other's accounts. It's totally unprepared for a world of single-user devices where non-technical people want to run untrusted software.
IMO this is the real innovation of iOS: not simply locking everything down, but locking everything down by default and putting the user in control of where to release those valves. Catalina introduced a fairly ham-fisted version of this that doesn't work super well in practice, but I think they've got the right idea.
Improvement ideas for the Catalina model:
- A terminal interface. Right now if you run a program that tries to access Documents you get a pop-up. If you ran it from the terminal, why not get a terminal prompt, a la sudo?
- A central place to manage all of the permissions you've allowed and disallowed (this may already exist and I just don't know about it)
- No special status for folders like "Documents" and "Downloads"; a generalized way of specifying any arbitrary directory (recursive and non-recursive, maybe with patterns). For regular users there can be a simplified UI overlaid on top, while power-users could manage these directly.
- Separate read and write permissions for files and directories
Imagine if you ran all those NPM install scripts and they only had write permissions to their subdirectory of node_modules, only had read permissions to your path, and would dynamically prompt you if they had a reason to request something beyond that
EDIT: What if you could also designate certain programs as trusted "authorities" that can then automatically delegate these permissions to other programs? Running with the example, you could allow NPM to dole out narrow permissions to postinstall scripts as needed, coming back up to prompt you in unusual cases. This would hugely improve the user-experience issue and these "authorities" wouldn't really have any more power than they already do today.
Problems with all of those: it becomes too much overhead and the additional moving parts create additional places for things to break (and they do break - even in a preconfigured distro).
The first is that no one actually wants to manage that kind of access. Especially not your every day computer user.
The second, related, problem is that if every app is asking you to review 20 permissions, people are going to stop reading the list and blindly accept. Or at least the people who need the guardrails the most will blindly accept.
For all the crazy granular permissions I just don't see a way for it to work other than a source like Apple doing the review, saying that this app is trying to read your documents for no reason and so it's rejected. But now you're back to all apps going through the app store sandbox.
This sounds entirely possible to do within the existing macOS sandboxing framework.
The iPhone is a success, because developers are not its target audience.