Question 440
Following lab verification, document the preventive or persistence-oriented procedure for: A user accidentally gives write permission to everyone on an application's configuration file. Which practice is most suitable?
Explanation
Correct Answer
Audit filesystem permissions on configuration files after each deployment. This guards against recurrence of: DAC mode bits can allow unauthorized modification even if service function appears correct. Confirm the lab's final state by: `stat -c '%a %U:%G'` displays the restricted mode and an unrelated user cannot modify it.
Incorrect Answers
Set a restrictive umask in service startup or trusted shell policy for secret handling. That control is best suited to a separate scenario: A shell session creates files with default modes exposing group-readable secrets to unrelated users. It is not the best safeguard for the current mechanism: DAC mode bits can allow unauthorized modification even if service function appears correct.
Verify persistence and remove temporary diagnostic firewall permits. That control is best suited to a separate scenario: A firewall change is tested using only a runtime rule, but an administrator assumes it will be present after restart. It is not the best safeguard for the current mechanism: DAC mode bits can allow unauthorized modification even if service function appears correct.
Use policy-backed fcontext mappings for nonstandard service directories. That control is best suited to a separate scenario: A temporary `chcon` label change makes a lab web file work, but `restorecon` later reverts it and the outage returns. It is not the best safeguard for the current mechanism: DAC mode bits can allow unauthorized modification even if service function appears correct.