Wednesday, September 23, 2020

macOS Containers and defaults

Jeff Johnson:

If Terminal app has Full Disk Access, then defaults write is smart enough to use the preferences file in Safari’s container. But if Terminal does not have Full Disk Access, then defaults falls back to the preferences in the ~/Library/Preferences folder! So if you do defaults write IncludeInternalDebugMenu -bool true without Full Disk Access, it’ll write to ~/Library/Preferences/, but that has no effect, because Safari is sandboxed and only reads preferences from its own container. Note that this happens even if there’s no old file at ~/Library/Preferences/, because defaults will create a new file when necessary.


Update (2020-11-02): See also: Dan Moren.

Comments RSS · Twitter

Leave a Comment