Cron Permissions or Access

Cron allows you to assign who can execute or not execute any file. The following files can do it:

Cron allow –  /etc/cron.allow

Cron deny –  /etc/cron.deny

Things to remember:

  • Add the name before the file, whether you want to allow or deny this specific name in using cron.
  • If you don’t want anyone to use cron, add the line ALL before the cron.deny file.
  • If both files do not exist, only the root user can use cron.
  • If both cron.allow and cron.deny have the user’s name, then the user still may use cron.
  • If cron.deny is present but is empty, all users can use cron.
  • If there’s a user in cron.deny, but there’s no cron.allow file, then ALL users can use cron, but not the ones listed in cron.deny.

Was this article helpful?

Related Articles