The exact messages
As the blocked user (tested on Ubuntu 24.04):
$ crontab -l You (alice) are not allowed to use this program (crontab) See crontab(1) for more information
When root acts on a blocked user, Debian cron words it differently:
$ sudo crontab -u alice -l The user alice cannot use this program (crontab)
cronie built with PAM can also print You (alice) are not allowed to access to (crontab) because of pam configuration. That one comes from /etc/security/access.conf or the PAM stack, not from the allow/deny files.
How cron.allow and cron.deny decide
- If
/etc/cron.allowexists, only users listed in it (one per line) may use crontab.cron.denyis ignored. - If only
/etc/cron.denyexists, everyone may use crontab except the users listed. - If neither exists, it depends on the implementation (table below).
- Root is always allowed on Debian.
| Distro | Neither file exists | Shipped by default |
|---|---|---|
| Debian, Ubuntu | All users allowed | Neither file |
| Fedora's cronie package (RHEL and Amazon Linux build from Fedora) | Only root allowed | An empty /etc/cron.deny, so everyone is allowed |
| Arch (cronie) | Only root allowed | /etc/cron.deny is installed by the package |
So on a cronie system, deleting /etc/cron.deny locks every normal user out.
Fix
# See which files exist ls -l /etc/cron.allow /etc/cron.deny # If cron.allow exists, add the user echo alice | sudo tee -a /etc/cron.allow # If only cron.deny exists, remove the user from it sudo sed -i '/^alice$/d' /etc/cron.deny
Still blocked? Check permissions
On Debian, if either file exists but isn't world-readable or readable by the crontab group, cron denies everyone until the permissions are fixed. cronie treats an unreadable file as if it didn't exist. Either way:
sudo chmod 644 /etc/cron.allow /etc/cron.deny
On Debian and Ubuntu, crontab itself must be setgid to the crontab group (-rwxr-sr-x root crontab). If that bit was stripped, normal users can't write to the spool directory.
ls -l /usr/bin/crontab
Sources
Checked against these official sources and, where marked, tested on Ubuntu 24.04 (cron 3.0pl1-184ubuntu2). Last verified 18 November 2026.