easyMultiple ChoiceObjective-mapped
XK0-006 Add a script to be executed daily Practice Question
Exhibit
Refer to the exhibit. ``` $ ls -l /etc/cron.daily/ total 8 -rwxr-xr-x 1 root root 245 Mar 10 10:00 logrotate -rwxr-xr-x 1 root root 123 Mar 10 10:00 syscheck ```
An administrator needs to add a script to be executed daily. The script is placed at /etc/cron.daily/myscript. After placing the script, it does not run. Based on the exhibit, what is the most likely issue?
⚠ Common exam trap
Many candidates assume ownership or the cron daemon status is the issue, but the specific requirement for the executable bit on scripts in cron.daily directories is a subtle but frequently tested detail.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The script is not executable
Scripts placed in /etc/cron.daily/ are executed by run-parts, which requires files to have the executable bit set. Without the execute permission (e.g., chmod +x), the script is skipped entirely, even if it is owned correctly and the cron daemon is active.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The script is owned by the wrong user
Why it's wrong here
It should be owned by root, like the others.
- ✗
The cron daemon is not running
Why it's wrong here
If cron were not running, none of the daily scripts would run.
- ✓
The script is not executable
Why this is correct
Scripts must have execute permission to be run by run-parts.
- ✗
The script is not listed in /etc/crontab
Why it's wrong here
cron.daily scripts are run automatically; no entry needed.
- ✗
Anacron is not installed
Why it's wrong here
Anacron is for systems that are not running 24/7, but cron.daily would still run.
Go deeper
Related to this question
Learn chapter
Networking Fundamentals and Configuration
Key term
cron
Cron is a time-based job scheduler in Unix-like operating systems that automatically runs commands or scripts at specified dates and times.
Key term
chmod
chmod is a command in Linux and Unix-like operating systems used to change the permissions (read, write, execute) of a file or directory.
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.