Have you gone to erase a USB drive on MacOS for it to fail and be presented with the message “The calling process or user lacks the proper privileges to perform”?
To get around this we need to grant the Disk Utility application Fill Disk Access. Open System Settings, go to the Privacy and Security section and click on Full Disk Access.
Look through the list of applications in the list. If Disk Utility is not in the list, click the + symbol to add it.
You will be prompted for your Touch ID or password. Enter your credentials to proceed.
Navigate to Utilities within Applications and select Disk Utility. Click Open.
If you have Disk Utility already open you will be asked if you want to Quit & Reopen the application.
Within Full Disk Access you will see Disk Utility in the list with the toggle on.
Now when you try to erase the USB within Disk Utility the process will be successful.