5 ms·
It's a workaround for the new permissions system in Catalina being a complete mess from the get go. Previously, the Terminal in Catalina would pop up a dialogue
by Wowfunhappy 7y ago
It's a workaround for the new permissions system in Catalina being a complete mess from the get go. Previously, the Terminal in Catalina would pop up a dialogue asking for permission to access the file you'd just dragged in.
Good security or not, this entire system should not have been rolled out unless/until Apple had a sane UI for handing it. They don't.
- saagarjha 7y agoThe "sane UI" in this case is one that has already existed for years, and it's the user intent of dropping a file into an application to give it access.
- djsumdog 7y agoI dunno. It makes me think of the Zen of Python's "Explicit is better than implicit." .. which is the point of the entire new Vista-style permission granting dialogues to begin with.
- zerkten 7y agoThose dialogs recognized the product had to change significantly for the time and were accompanied by many changes below the surface. I'm not sure that the same level of recognition exists in Apple circles.
- zerkten 7y agoIs this automatable with AppleScript, or similar? If so, then there are possibly some vectors that Apple are trying to block. There are likely many better ways to handle these situations, but I'm not sure I really expect it from the recent Apple. The most recent Apple is recognizing issues (i.e. MacBook Pro keyboard), but I doubt the whole organization has caught up.
- saagarjha 7y agoWhat, dragging a file and dropping it onto an application to grant it access? I am not sure. I'd like to think that doing this programmatically would be locked down if it allows an application to extend their access without user consent.
- zerkten 7y agoYou'd like to think? Operating systems have had loads of vulnerabilities from features like this. There needs to be defense in depth.
- williamDafoe 7y agoIt's so darned important to skip the step of asking the user if they want to make the file world, group, or user readable. So darned! I bet the guy who invented this has a patent and is a vp by now ....
- Wowfunhappy 7y agoI'm not a fan of what Apple has done in Catalina, but I don't think your take is completely fair. "For years", simply opening an app implicitly gave it access to most of the data on your hard drive. Regardless of whether you opened or dragged in a particular file. In Catalina, Apple wanted to restrict this. As a consequence, in the initial release of Catalina, you could drag a file from your desktop into your Terminal, but your Terminal would be unable to access the file. Which of course is terrible UX! So what Apple did in this update is give back the behavior you're describing: dragging a file into the Terminal implicitly grants the Terminal access. But unlike in old OS's, the Terminal doesn't suddenly get access to most of the other data on your hard drive as well. Unfortunately, in order to walk that fine line, Apple had to add an extra, undocumented file attribute. And because Apple policy is for anything TCC-related should be SIP-protected, that attribute is protected by SIP and cannot be manually edited. And because a UI for revoking access to individual files would be a complete nightmare, there's no UI pathway either... Apple's intentions with all of this absolutely make sense. The problem is that good intentions don't matter if the execution is flawed.
- saagarjha 7y agoI am talking about a very specific feature of the Powerbox that gives you a security scoped bookmark to access a resource, even if you are sandboxed: https://news.ycombinator.com/item?id=21828138 https://news.ycombinator.com/item?id=21828138
- btown 7y ago> And because the UI for revoking access to individual files would be a complete nightmare, there's no UI pathway either. Why would this be a complete nightmare? There's no way to override a permission that's been granted to your ancestor - so why shouldn't the OS be able to remove the flag when you remove the permission in Settings? Why shouldn't the OS be able to maintain the invariant between the permissions dialog and the on-disk representation, given that the on-disk representation can only be set by the OS? That's just sad.
- Wowfunhappy 7y agoThe OS can certainly remove the flag. I just can't imagine what the UI for that would look like in Settings, once you've dragged many hundreds of files into the Terminal over the course of using your computer for several months. You could put it in the individual file's get info pane, but more users open that pane than know what the Terminal is. This is the kind of setting you'd want to control via either the Terminal (ironically) or a third party app. But Apple has decided only Apple-supplied software with a UI is allowed to control TCC.
- heydabop 7y ago> It's a workaround for the new permissions system in Catalina being a complete mess from the get go. I fucking hate it. Programs can write to my user dir and folders within it freely, but god forbid they touch my sacred Downloads, Documents, and Desktop folders! Better ask me first! It's like it was made by the iOS dev team but also the iOS dev team has never used a computer before. I had to add ruby to full disk access to get emacs to work, because emacs is launched by a ruby script and it was insane that I couldn't ls my Downloads folder from it.
- deleted 7y ago[deleted]
- jaredklewis 7y agoIt’s not perfect but I think there is sound logic to to the way it works. My wife is a fairly average computer user, and she has not added any files outside those folders that are in the user directory by default (Downloads, Desktop, Documents, Pictures, etc...). I think it seems pretty logical that Documents or Pictures for most users will include more personal data that needs protecting than ~/.config or whatever.
- shakna 7y ago~/.local on the other hand will frequently include information that under a tighter permission system should not be accessed without approval. Things like my complete shell history can be found there.