XK0-005 · Question #1711
XK0-005 Question #1711: Real Exam Question with Answer & Explanation
The correct answer is A: Creating the file cron.allow and adding user cron to it. The error indicates that the cron user does not have permission to run the cronjob. Creating a cron.allow file and adding the user cron to it will allow that user to run cronjobs. The cron.allow file is a security feature that controls which users are allowed to use cron.
Question
A systems administrator created a user cron to run a scheduled database backup cronjob on the server at 1 a.m. everyday. The following is the cronjob syntax: 01 * * * /bin/sh backup.sh The backups, however, are not being created. When checking the crontab file, the administrator sees the following error: $ cron@localhost:$ crontab -e /var/spool/cron/crontab/cron: Permission denied Which of the following will permit the cronjob to execute?
Options
- ACreating the file cron.allow and adding user cron to it
- BGiving cron ownership of the file /usr/bin/crontab
- CRunning sudo cron restart to activate the cronjob
- DRunning sudo crontab -u cron -e to edit the file with sudo
Explanation
The error indicates that the cron user does not have permission to run the cronjob. Creating a cron.allow file and adding the user cron to it will allow that user to run cronjobs. The cron.allow file is a security feature that controls which users are allowed to use cron.
Topics
Community Discussion
No community discussion yet for this question.