• Most COVID-19 rules have ended in New Zealand.
    • You must still isolate for 7 days if you have COVID-19.
    • You must wear a face mask in healthcare facilities, such as hospitals. International travellers will not need proof of COVID-19 vaccination.
    From 13 September 2022, to enter New Zealand, you do not need proof of vaccination.

Fixing DirectAdmin: You (user) are not allowed to use this program (crontab)

Andy

Administrator
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
771
Reaction score
32
Points
28
Screen Shot 2020-05-11 at 9.09.12 AM.png

Scenario:
You have granted a user package with Cron Jobs ticked, but when the user creates a cron job from DirectAdmin or from the shell, they got:
Bash:
saputra@cana:~$ crontab -l
/etc/cron.deny: Permission denied
You (saputra) are not allowed to use this program (crontab)
See crontab(1) for more information
saputra@cana:~$

It's most likely related to the +s flag on the crontab binary, check using this command:
Bash:
root@cana:~# ls -al /usr/bin/crontab
-rwxr-sr-x 1 root crontab 36008 Mar 22  2019 /usr/bin/crontab
root@cana:~#

And here's how to fix it:
Bash:
root@cana:~# chmod 4755 /usr/bin/crontab
root@cana:~# ls -al /usr/bin/crontab
-rwsr-xr-x 1 root crontab 36008 Mar 22  2019 /usr/bin/crontab
root@cana:~#

Now the users will be able to setup their cron:
Bash:
saputra@cana:~$ crontab -l
#direct_crons enabled. Safe to edit this file. DirectAdmin will update accordingly.
MAILTO=""
saputra@cana:~$

Reference: https://help.directadmin.com/item.php?id=615
 
 Short URL:
Top