Closed Bug 2068208 Opened 3 months ago Closed 2 months ago

[macOS 27] Warn `./mach run` users about new Firefox directory protections

Categories

(Firefox Build System :: General, enhancement)

enhancement

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: haik, Assigned: haik)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 1 external file)

In macOS 27, ~/Library/Application Support/Firefox has new access protections preventing unsigned or non-Mozilla-signed applications from reading/writing to the directory.

A local build launched with ./mach run will be prevented from launching due to not being able to read ~/Library/Application Support/Firefox. This bug is filed to warn users about this when they run ./mach run and the directory can't be accessed.

To workaround this problem:

  • Grant Terminal access to Firefox data in macOS Privacy & Security -> Files and Folder system settings

Other workarounds that avoid giving Terminal access to the profile directory (for improved security for developers against rogue scripts/commands):

  • Use the -a/--appdata argument: ./mach run -a

  • Set MOZ_APP_DATA and MOZ_LOCAL_APP_DATA environment variables. For example MOZ_LOCAL_APP_DATA=~/Library/Caches/FirefoxDevData MOZ_APP_DATA=~/Library/Application\ Support/FirefoxDevData ./mach run

  • Use signed builds (dependent on a fix for bug 1883815)

See bug 2069536 and bug 1977540 for future work to default to unofficial app data directories for all ./mach {test,run,mozregression,...} launches.

Blocks: 2063096
Attachment #9634222 - Attachment description: Bug 2068208 - [macOS 27] Warn `./mach run` users about new Firefox directory protections r?#firefox-build-system-reviewers → Bug 2068208 - [macOS 27] Use an alternate data dir on macOS 27 when the default is not accessible r?#firefox-build-system-reviewers
See Also: → 2069536
Attachment #9634222 - Attachment description: Bug 2068208 - [macOS 27] Use an alternate data dir on macOS 27 when the default is not accessible r?#firefox-build-system-reviewers → Bug 2068208 - [macOS 27] Warn `./mach run` users about new Firefox directory protections r?#firefox-build-system-reviewers
Pushed by ahochheiden@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/92a4a0d0a105 https://hg.mozilla.org/integration/autoland/rev/59362acacc01 [macOS 27] Warn `./mach run` users about new Firefox directory protections r=firefox-build-system-reviewers,ahochheiden,mac-reviewers,bradwerth
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch

Adding a screenshot showing how to grant Terminal access to Firefox data in macOS Privacy & Security -> Files and Folder system settings.

Attachment #9644748 - Attachment description: Give Terminal access to Firefox Files & Folders → Screenshot - Give Terminal access to Firefox Files & Folders
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: