Open Bug 1282586 Opened 5 years ago Updated 3 years ago
.cleanup changes file ownership and permissions when restoring backed-up files like profiles .ini
I encountered this when I tried to run Fennec in an emulator via mach (`./mach android-emulator; ./mach run`) after having run Fennec in an emulator using mozrunner.FennecEmulatorRunner. The difference between the two is that `./mach run` uses mozrunner/devices/android_device.py, whereas FennecEmulatorRunner uses mozrunner's Device class. As part of closing Fennec and the emulator, Device.cleanup  copies the original profiles.ini back onto the emulator, but the "restored" file is owned by root instead of "u0_a43", for example. If you then try to run Fennec on the emulator via mach, you see a start-up crash because of a permission-denied error when the browser needs to update profiles.ini. From logcat: ``` D/GeckoProfile( 658): Created new profile dir. D/Telemetry( 658): StartUISession: firstrun.1 W/System.err( 658): java.io.FileNotFoundException: /data/data/org.mozilla.fennec/files/mozilla/profiles.ini: open failed: EACCES (Permission denied) ```  https://dxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/devices/base.py#250-252
5 years ago
Summary: [mozrunner] Device.cleanup changes file ownership and permissions when restoring backed-up files l like profiles.ini → [mozrunner] Device.cleanup changes file ownership and permissions when restoring backed-up files like profiles.ini
You need to log in before you can comment on or make changes to this bug.