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

Andy

Administrator
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
1,121
Reaction score
57
Points
48
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:
Back
Top