CompTIA
XK0-005 · Question #206
A Linux administrator is restoring the SELinux contexts on an entire system. Which of the following commands is the BEST option to complete this task?
The correct answer is C. touch /.autorelabel && reboot. As the .autorelabel file will force a RECURSIVE check of the whole system on boot whereas answer D lacks the -R flag that restorecon needs to work RECURSIVELY over the whole filesystem. Without -R it just works on a single file/dir.
Security
Question
A Linux administrator is restoring the SELinux contexts on an entire system. Which of the following commands is the BEST option to complete this task?
Options
- Asetenforce 0 && reboot
- Bsetfacl -bR / && reboot
- Ctouch /.autorelabel && reboot
- Drestorecon / && reboot
How the community answered
(36 responses)- B3% (1)
- C94% (34)
- D3% (1)
Explanation
As the .autorelabel file will force a RECURSIVE check of the whole system on boot whereas answer D lacks the -R flag that restorecon needs to work RECURSIVELY over the whole filesystem. Without -R it just works on a single file/dir.
Topics
#SELinux#File contexts#System security#Linux commands
Community Discussion
No community discussion yet for this question.