{"id":30218,"date":"2020-09-23T16:50:19","date_gmt":"2020-09-23T20:50:19","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=30218"},"modified":"2020-11-02T16:22:35","modified_gmt":"2020-11-02T21:22:35","slug":"macos-containers-and-defaults","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2020\/09\/23\/macos-containers-and-defaults\/","title":{"rendered":"macOS Containers and defaults"},"content":{"rendered":"<p><a href=\"https:\/\/lapcatsoftware.com\/articles\/containers.html\">Jeff Johnson<\/a>:<\/p>\n<blockquote cite=\"https:\/\/lapcatsoftware.com\/articles\/containers.html\">\n<p>If Terminal app has Full Disk Access, then <code>defaults write com.apple.Safari<\/code> is smart enough to use the preferences file in Safari&rsquo;s container. But if Terminal does not have Full Disk Access, then <code>defaults<\/code> falls back to the preferences in the <tt>~\/Library\/Preferences<\/tt> folder! So if you do <code>defaults write com.apple.Safari IncludeInternalDebugMenu -bool true<\/code> without Full Disk Access, it&rsquo;ll write to <tt>~\/Library\/Preferences\/com.apple.Safari.plist<\/tt>, but that has no effect, because Safari is sandboxed and only reads preferences from its own container. Note that this happens even if there&rsquo;s no old file at <tt>~\/Library\/Preferences\/com.apple.Safari.plist<\/tt>, because <code>defaults<\/code> will create a new file when necessary.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/09\/18\/safari-14\/\">Safari 14<\/a><\/li>\n<\/ul>\n\n<p id=\"macos-containers-and-defaults-update-2020-11-02\">Update (2020-11-02): See also: <a href=\"https:\/\/sixcolors.com\/post\/2020\/09\/enabling-the-debug-menu-in-safari-14-on-big-sur-and-catalina\/\">Dan Moren<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Jeff Johnson: If Terminal app has Full Disk Access, then defaults write com.apple.Safari is smart enough to use the preferences file in Safari&rsquo;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 com.apple.Safari IncludeInternalDebugMenu -bool true without [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2020-09-23T20:50:22Z","apple_news_api_id":"62feaf1b-e846-4559-8c9d-3ace3362ac54","apple_news_api_modified_at":"2020-11-02T21:22:39Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAQ==","apple_news_api_share_url":"https:\/\/apple.news\/AYv6vG-hGRVmMnTrOM2KsVA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[30,1666,1891,355,103,53,1235,318,1960],"class_list":["post-30218","post","type-post","status-publish","format-standard","hentry","category-technology","tag-mac","tag-macos-10-15","tag-macos-11-0","tag-privacy","tag-safari","tag-sandboxing","tag-system-integrity-protection","tag-terminal","tag-transparency-consent-and-control-tcc"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/30218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=30218"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/30218\/revisions"}],"predecessor-version":[{"id":30565,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/30218\/revisions\/30565"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=30218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=30218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=30218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}