Linux システム管理者が新しい Web サーバーをセットアップしていますが、ブラウザーから Web サーバーのページにアクセスしようとすると、404 - NOT FOUND エラーが発生します。 この問題の診断作業中に、Linux システム管理者は次のコマンドを実行します。 この問題を最も効果的に解決できるコマンドはどれですか?
正解:B
The command restorecon -R -v /var/www/html will best resolve the issue. The issue is caused by the incorrect SELinux context of the web server files under the /var/www/html directory. The output of ls -Z /var/www/html shows that the files have the type user_home_t, which is not allowed for web content. The command restorecon restores the default SELinux context of files based on the policy rules. The options -R and -v are used to apply the command recursively and verbosely. This command will change the type of the files to httpd_sys_content_t, which is the correct type for web content. This will allow the web server to access the files and serve the pages to the browser.