exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 47 discussion

Actual exam question from CompTIA's XK0-005
Question #: 47
Topic #: 1
[All XK0-005 Questions]

A Linux systems administrator is setting up a new web server and getting 404 - NOT FOUND errors while trying to access the web server pages from the browser. While working on the diagnosis of this issue, the Linux systems administrator executes the following commands:

Which of the following commands will BEST resolve this issue?

  • A. sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
  • B. restorecon -R -v /var/www/html
  • C. setenforce 0
  • D. setsebool -P httpd_can_network_connect_db on
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Alizadeh
8 months, 3 weeks ago
Selected Answer: B
The correct answer is B. restorecon -R -v /var/www/html.
upvoted 3 times
...
post20
1 year, 1 month ago
Option B is the best answer to resolve the issue, as the output of the matchpathcon command indicates that the context of the files under /var/www/html is incorrect. restorecon -R -v /var/www/html will restore the default SELinux context to the files under /var/www/html, which will allow the web server to access them properly.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago