Solution 1:

Yes. Open up security preferences.

  • https://support.apple.com/en-us/HT210595

Add Terminal app to full disk access, same as described for the systemsetup command.