Score:0

Crontab permission denied despite user being listed in /etc/cron.allow

tw flag

I'm attempting to run crontab as the "ubuntu" user on a machine running Ubuntu 20.04. I get a permission denied error despite the "ubuntu" user existing in /etc/cron.allow.

$ crontab -l
/etc/cron.allow: Permission denied
You (ubuntu) are not allowed to use this program (crontab)
See crontab(1) for more information

I have older machines running on Ubuntu 18.04 with the same /etc/cron.allow configuration where running crontab succeeds. Only when testing on 20.04 do I get permission denied.

Also worth noting that file permissions for /etc/cron.allow are set to 600. If I manually set the permissions to 644, then I can successfully run crontab as ubuntu, but I would like to keep the 600 setting if possible. On the 18.04 machines, the permissions are 600 and crontab still succeeds.

hr flag
Perhaps you could compromise and make it 640 with ownership `root:crontab`?
hr flag
... fyi the 18.04 behavior appears to have been [a bug](https://bugs.launchpad.net/ubuntu/+source/cron/+bug/1813833) that has since been fixed
Score:0
tw flag

Credit to @steeldriver

... fyi the 18.04 behavior appears to have been a bug that has since been fixed

Their suggested fix of setting the file permissions of /etc/cron.allow to 640 and setting ownership to root:crontab solved my issue.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.