Can not use any shell in some folders

Hi all,


I'm having some issues with some email accounts (ie: they are phantom accounts, present in Mail, but settings are not available), so wanted to clean "~/Library/Mail"


Surprise ! I can not access "~/Library/Mail" at all any more from the command line, I get an operation not permitted. You can still browse it from the Finder.


I get the enhanced security, but we still need to find ways to work...

Same thing here. Have filed a bug report. I suspect this might be caused by some sort of CSR-linked new protection. Like, a virus cannot tamper with your mail or web browser anymore.

Access to certain folders, like Mail, is blocked by SIP in 10.14. If you really need to get in there, disable SIP.

This is dumb. While I can grok the idea beyond this, it at least lacks subtlety, like a one-size-fits-all approach. There should at least be two options in csrutil to disable user files/system files protection separately

This is intentional. See https://developer.apple.com/videos/play/wwdc2018/702/


Note that if you are running scripts within Terminal.app, you can authorize Terminal itself. Granting access to an app includes any child processes (e.g. your scripts running in Terminal and any unix binaries called by them).


Open Security and Privacy pref, go to Privacy tab, then add Terminal to "Application Data." Then any scripts running within Terminal will be able to access ~/Library/Mail, etc.


Note that this feature is distict than SIP, though it undoubtedly uses the some tech under the hood (i.e. disabling SIP will disable User Data protection as well).

Can not use any shell in some folders
 
 
Q