nerdexam
CompTIA

XK0-005 · Question #716

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…

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.

System Management

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

How the community answered

(20 responses)
  • A
    85% (17)
  • B
    5% (1)
  • C
    10% (2)

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

#Cron#Permissions#Access Control

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice