2019-02-20

atd[30334]: Permission denied

# printf 'touch ~/test.at\n' | at 'now + 1 minutes'
# atq
7 2019-02-20 11:52 a root
6 2019-02-20 11:44 = root
It seems that the AT jobs are not being executed even it is "root" user already. And so I checked the logs..
# grep -i permission /var/log/messages
Feb 20 10:34:00 atd[22786]: Permission denied
Feb 20 10:46:00 atd[24032]: Permission denied
Feb 20 10:57:00 atd[25193]: Permission denied
Feb 20 11:07:00 atd[26374]: Permission denied
Feb 20 11:11:00 atd[26858]: Permission denied
Feb 20 11:44:00 atd[30334]: Permission denied
And I remember solving this in the past by adding it to /etc/security/access.conf
# grep root /etc/security/access.conf | grep -v ^#
+ : root : 127.0.0.1 login localhost cron crond at atd
I removed the old jobs and tried again. Indeed it's working now as expected!
# atrm 6
# atrm 7
# printf 'touch ~/test.at\n' | at 'now + 1 minutes'
# atq | wc -l
0
# ls -l test.at
-rw-r--r-- 1 root root 0 Feb 20 12:10 test.at