CompTIA Linux+ (XK0-004) — Question 126
Given the output below:
[root@appserver ~]# rm config.txt
rm: remove regular file 'config.txt'? yes
rm: cannot remove 'config.txt': Operation not permitted
Which of the following might be the cause?
Answer options
- A. The file config.txt does not have the user write bit set.
- B. The file config.txt does not exist.
- C. The file config.txt has the immutable attribute set.
- D. The file config.txt has an ACL that does not permit deletion by others.
Correct answer: A
Explanation
The correct answer is A because if the user write bit is not set, the user cannot delete the file. Option B is incorrect as the output indicates the file exists. Option C is wrong because there is no indication that the immutable attribute is set. Option D is also incorrect since the output doesn't mention any ACL restrictions.