mount: Operation not permitted

From: Ronald F. Guilmette <rfg_at_tristatelogic.com>
Date: Mon, 29 Nov 2021 21:33:11 UTC
I have a shell script that uses rsync to make backups of all of the
several partitions on my main drive to a second removable drive.
The script goes one-by-one through the partitions, mounting each
corresponding backup partition in turn, running rsync, and then
umount'ing that backup partition.

Mostly this script works well, but every so often, seemingly at random, the
mount command for one or more of the backup partitions fails for no apparently
good reason, and I get the message "mount: Operation not permitted".  If I
retry the same thing a little later it invariably works.

What am I doing wrong and how can I fix it?