Friday, July 3, 2015

Crontab: Permission denied


If you get "Permission denied" error message while adding any cron entry, follow these steps to fix the error.


[user@RHEL5 ~]$ crontab -e
-bash: /usr/bin/crontab: Permission denied




1. Check whether the user name is present in /etc/cron.deny file. If yes remove it.

2. Check whether /etc/cron.allow file is present. If yes, add user name to the file.

3. Check for cron related entry in PAM configuration  file.

    [user@RHEL5 ~]$grep "^+.*cron" /etc/security/access.conf

4. Change the file permission of crontab file

    #chmod 4775 /usr/bin/crontab

No comments:

Post a Comment