CompTIA Linux+ XK0-006 (V8) Practice Question

During an investigation into why a backup script cannot overwrite its snapshot file even when running as root, you gather the following information:

$ ls -l /mnt/backup/snapshot.img
-rw-r--r-- 1 root root 104857600 Aug  5 12:48 /mnt/backup/snapshot.img

$ lsattr /mnt/backup/snapshot.img
----i---------e---- /mnt/backup/snapshot.img

You need to allow the script to overwrite (replace) the file without changing any other extended attributes. Which command accomplishes this goal?

  • chattr -i /mnt/backup/snapshot.img

  • chattr +i /mnt/backup/snapshot.img

  • chmod +w /mnt/backup/snapshot.img

  • setfacl -m u:root:rw /mnt/backup/snapshot.img

CompTIA Linux+ XK0-006 (V8)
Troubleshooting
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot