I have a go binary that runs from /usr/local/bin
. This application has the ability to update itself by downloading the latest .pkg from our company and running it with the installer
command. Our application has also been granted Full Disk Access.
The command that is run by our application looks like this: installer -pkg /tmp/ourInstaller.pkg -target /
. This command works from a terminal (when run with sudo
and when the terminal has Full Disk Access). It also has been working on all MacOS version above 10.15.
With MacOS Sonoma on the M platform (not on an Intel device), this command has started to give the following error: installer: Package name is Agent Installer\ninstaller: Upgrading at base path /\ninstaller: The upgrade failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An unexpected error occurred while moving files to the final destination.)\n
.
This is an error we see when our application is not granted Full Disk Access, but as mentioned, our application has been granted Full Disk Access. Also, the installation appears to complete successfully, meaning the files are moved to the correct place, but the installation still errors.
It seems to be erroring while copying the new binary to /usr/local/bin
. In fact, it cannot copy any file to /usr/local/bin
without erroring, even a simple text file. This leads me to believe that it may be erroring on trying to rollback the previous install, but since the binary has Full Disk Access, it is failing to remove the old binary (rightfully so) and so the installer errors.
I just want to reiterate that this has always worked, and only with Sonoma on M architecture machines (M1 and M2) has this started erroring.