I have an Automator Workflow installed as a service, that I run via
Finder → Services → My Automator Workflow.
The workflow copies some files to a DOS formatted thumb drive, and them attempts to remove invisible directories from it before ejecting it. The device that then uses this drive doesn't like dot-directories like
Inside that Workflow is an AppleScript step, which includes a
do shell script command, which uses an
/bin/rm command which fails with the message:
The action “Run AppleScript” encountered an error: “rm: /Volumes/MERCEDES/.Spotlight-V100: Operation not permitted”
If I launch the workflow in Automator, I get the same error.
BUT, if I add Automator.app in
System Preferences → Security & Privacy → Privacy → Full Disk Access, I no longer get that error when I run the Workflow from Automator, but I still get it when I run from Finder.
So, naturally, I presume that when the script is run by the Services menu, it's different process running it, and I've been trying to figure out (by watching Activity Monitor) what process is so I can whitelist. Processes I've tried unsuccessfully:
Does anyone know which process needs to be whitelisted for this use case?