MoneyWorks Datacentre 9.2.7 Mac server migration

Upgrading MoneyWorks Datacentre Server on Mac is a little different with 9.2.7 (or any upgrade from pre-9.2.7 to post-9.2.7)

The problem

For many years, MoneyWorks Datacentre on Mac has installed in /Library/MoneyWorks and the service would run as a special user moneyworks_server. This was intended to isolate the server from other user data on the machine. However, this has become increasingly problematic since Apple introduced TCC (Transparency, Consent, and Control) that limits software access to certain folders, such as the Documents folder, without explicit permission being granted. This is a different isolation model tha thas turned out to be quite incompatible with isolating the service via a dedicated (hidden) user. Perversely this caused the server user to not have access to its own Documents folder, and Apple provided no good way for the permission to be granted. The workaround was to require Full Disk Access. Not ideal.

Additionally, Apple’s Migration Assistant was also not compatible with this scheme and would bork your Datacentre installation if you migrated it to a new Mac with Migration Assistant by turning moneyworks_server into a regular user and moving its home folder to /Users.

Now, MacOS 27.3 raises the bar on the scare factor of Full Disk Access – Apple really, really does not want software to use it. So it is finally time to throw in the towel on running as a moneyworks_server.

Solution: New location, new identity

From v9.2.7, MoneyWorks Datacentre will run as the console user (i.e. the user who installs the software, or upgrades it from an earlier version). This will involve migrating the files at /Library/MoneyWorks/Documents and /Library/MoneyWorks/Library to ~/Library/MoneyWorks. The moneyworks_server user and its home folder will be removed. Do not do this manually — the installer will do it.

For safety, the upgrade install will do a preflight check to make sure there are no unexpected files in the folder that might be lost when the user is deleted. The install will not proceed in this case. If the install stops for this reason, please go to /Library/MoneyWorks/ and remove anything extra you have placed there. Do not move /Library/MoneyWorks/Documents and /Library/MoneyWorks/Library — the installer will move those to the new location. After removing any other files that do not belong to the service, you can run the upgrade again.

New home for the server

You can run the install as the user you normally log into your Mac server as. If you want more isolation, you can create a dedicated normal user (admin or non-admin), log in as that user and run the upgrade. This will cause the service to run as that user.

  1. The new home will be ~/Library/MoneyWorks (i.e. /Users/YourUser/Library/MoneyWorks)
  2. The server documents will be in ~/Library/MoneyWorks/Documents
  3. Other server support files will be in ~/Library/MoneyWorks/Library
  4. There will be a symbolic link at /Library/MoneyWorks owned by the console user that points to the console user’s ~/Library/MoneyWorks. This link must not be removed. The server will rely on it. The MoneyWorks Datacentre Console app will still show the configuration path as /Library/MoneyWorks/Documents using this symlink. Likewise for backups and archives
  5. The service still runs as a LaunchDaemon, not a LaunchAgent, so that it will be available after a reboot without the owning user account being logged in. For this reason it is still necessary to authenticate as an admin to start and stop the service. Note that to run at boot, the Mac server must not use FileVault. Nothing will run after boot on a FileVault-encrypted Mac until someone logs in to decrypt the boot drive

Benefits

  1. No FDA required. Existing FDA can be removed for MoneyWorks Datacentre Console.app
  2. Migration Assistant will now be safe to use to move to a new Mac
  3. Adding files to the Documents folder will not require ownership to be fixed
  4. Complete uninstallation is simpler due to no extra user – just delete the Console app; the plist in LaunchDaemons; the ~/Library/MoneyWorks folder; and the /Library/MoneyWorks symlink
Posted in Uncategorized | Comments Off on MoneyWorks Datacentre 9.2.7 Mac server migration