0

How would I fix this on macOS 11

$ at 0200
at: cannot open lockfile /usr/lib/cron/jobs/.lockfile: Operation not permitted

This started to happen after accidentally dismissing an incessant prompt whether I'd give Terminal permissions to administer the system.

This goes away after 5-10 minutes: retrying at command succeeds

Removing the lock file did not help the matter:

$ sudo rm /usr/lib/cron/jobs/.lockfile
rm: /usr/lib/cron/jobs/.lockfile: No such file or directory
antonsmbp:tangomultic atropashko$ at 0300
at: cannot open lockfile /usr/lib/cron/jobs/.lockfile: Operation not permitted

1 Answer 1

0

Try ls -l /usr/lib/cron/jobs/.lockfile to see if lockfile exists longer than necessary. Maybe its owned by root or other user and coannot be created as your user.

Try to remove /usr/lib/cron/jobs/.lockfile as root (you have to enable root).

2
  • You don't ever have to enable root on Mac - nor, if you did, would it gain you anything.
    – Tetsujin
    Sep 10, 2021 at 11:48
  • Removed: no dice. Sep 10, 2021 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.