Unable to run compact on oplog.rs in local database in atlas cluster

This can only be done on M10+ clusters and for system collections (oplog being one) extra permissions are required.

https://www.mongodb.com/docs/manual/reference/command/compact/#compact-required-privileges

See Deleted sizeable content from database, back ups and DB did not shrink - #2 by chris for how to execute a compact correctly in MonogDB Atlas.