I came across this error when trying to execute…
/usr/bin/tmutil latestbackup
via Apple Remote Desktop (ARD) on my iMac to iMac Mojave Clients.
And found that adding…
ARDAgent.app
(from /System/Library/CoreServices/RemoteManagement/)
to Full Disk Access (under Security and Privacy > Privacy) on the Client Target iMac – got it to work.
In a similar fashion the presence of SSHD in ….
Security and Privacy > Privacy Tab > Full Disk Access
will allow the command to be run via SSH from my iMac to a Client iMac.
(SSHD will be there if you’ve enabled SSH in Sharing)
Interestingly on the client iMac itself, executing …
/usr/bin/tmutil latestbackup
won’t work unless Terminal is added to Privacy. But the same command executed from my iMac to target iMac via SSH or ARD
will work, even if Terminal isn’t added to Privacy of the Client iMac. (So long as ARDAgent and SSHD are added to Privacy on the Client)
So it looks like you can run tmutil ‘under the auspices’ of ARDAgent or SSHD without having to add Terminal to Privacy
I’m sure all that can be explained in Terms of Caller and Helper etc (and I’m grateful to the above answer in solving my issue).
Incidentally – if you follow this thread:
https://macscripter.net/viewtopic.php?id=46620
A similar case where adding osascript to Privacy sorted out the problem.