New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA XK0-005 Exam - Topic 10 Question 9 Discussion

Actual exam question for CompTIA's XK0-005 exam
Question #: 9
Topic #: 10
[All XK0-005 Questions]

A Linux administrator encounters the following error in the Apache log files:

css

SQLSTATE[HY000] [2002] Permission denied

Which of the following commands should the administrator run to safely fix this issue?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
German
4 months ago
Option A seems like a good choice too.
upvoted 0 times
...
Abraham
4 months ago
Wait, is it really that simple to fix?
upvoted 0 times
...
Elly
4 months ago
I disagree, option C is too risky.
upvoted 0 times
...
Sena
4 months ago
Definitely go with option B!
upvoted 0 times
...
Herman
4 months ago
Looks like a SELinux issue.
upvoted 0 times
...
Theola
5 months ago
I vaguely recall that "chcon" is used for changing context, but I'm not confident if it's the best solution for this specific error.
upvoted 0 times
...
Joaquin
5 months ago
I practiced a question like this before, and I feel like "setenforce 0" could be a temporary fix, but it doesn't seem safe for production.
upvoted 0 times
...
Weldon
5 months ago
I think option B might be the right choice since it relates to allowing Apache to connect to the database, but I need to double-check that.
upvoted 0 times
...
Gwen
5 months ago
I remember something about SELinux permissions causing similar issues, but I'm not sure which command to use here.
upvoted 0 times
...
Joana
5 months ago
Hmm, this is a tricky one. I'm not sure if 'Similar Items' or 'Collaborative Filtering' is the right answer. I'll have to think this through carefully.
upvoted 0 times
...
Alona
5 months ago
This looks like a straightforward question on inventory carrying costs. I'm pretty confident I can identify the major components based on my course material.
upvoted 0 times
...
Kristeen
5 months ago
I remember practicing a similar question, and I'm pretty sure the Header is also a part of a SOAP message. Not sure about the Footer, though.
upvoted 0 times
...
Tiera
10 months ago
Wait, wait, wait... Did someone say 'permission denied'? I bet the admin just needs to run 'sudo' in front of whatever command they choose. Problem solved!
upvoted 0 times
Dana
9 months ago
Wait, wait, wait... Did someone say 'permission denied'? I bet the admin just needs to run 'sudo' in front of whatever command they choose. Problem solved!
upvoted 0 times
...
Dana
9 months ago
B) setsebool -F httpd_can_network_connect_db on
upvoted 0 times
...
Dana
9 months ago
A) chcon -c httpd_sys_content_t /home/apache
upvoted 0 times
...
...
Colton
10 months ago
Ah, I see the problem - the Apache content directory doesn't have the right SELinux context. Option A, 'chcon -c httpd_sys_content_t /home/apache', should do the trick.
upvoted 0 times
Jeniffer
8 months ago
User 3: Thanks for the solution, I will try running that command to resolve the error.
upvoted 0 times
...
Tasia
9 months ago
User 2: Option A, 'chcon -c httpd_sys_content_t /home/apache', is the right command to fix it.
upvoted 0 times
...
Alfreda
9 months ago
User 1: I think the issue is with the SELinux context of the Apache content directory.
upvoted 0 times
...
...
Markus
10 months ago
Hold up, I've got a good one - the admin should just do 'touch /.autorelabel' (option D) and let the system handle it. Easy peasy, right? Not sure if that's the best option, though.
upvoted 0 times
Fletcher
8 months ago
I see your point. 'setenforce 0' (option C) could also be a possible solution to consider.
upvoted 0 times
...
Yaeko
8 months ago
But wouldn't 'setsebool -F httpd_can_network_connect_db on' (option B) be more appropriate in this case?
upvoted 0 times
...
Milly
8 months ago
I'm not so sure about that. Maybe 'chcon -c httpd_sys_content_t /home/apache' (option A) would be safer.
upvoted 0 times
...
Robt
8 months ago
I think 'touch /.autorelabel' (option D) is the best choice here.
upvoted 0 times
...
Annamae
8 months ago
I still think 'touch /.autorelabel' (option D) is the safest option to resolve the error in the Apache log files.
upvoted 0 times
...
My
8 months ago
Actually, 'setenforce 0' (option C) might be the best choice to temporarily fix the problem.
upvoted 0 times
...
Trinidad
9 months ago
No, I believe 'chcon -c httpd_sys_content_t /home/apache' (option A) is the correct command to use in this situation.
upvoted 0 times
...
Jerry
9 months ago
I think the admin should run 'setsebool -F httpd_can_network_connect_db on' (option B) to fix the issue.
upvoted 0 times
...
...
Jutta
10 months ago
Hmm, disabling SELinux enforcement with 'setenforce 0' (option C) seems like a quick fix, but it's not the most secure approach. I'd stick with B to keep things locked down.
upvoted 0 times
...
Sue
10 months ago
Hmm, that makes sense too. Let's see what others think before making a final decision.
upvoted 0 times
...
Reta
11 months ago
Whoa, looks like a permissions issue with the Apache server and the database connection. I'd go with option B, 'setsebool -F httpd_can_network_connect_db on' to safely enable the connection.
upvoted 0 times
Tanesha
9 months ago
Great, let's try 'setsebool -F httpd_can_network_connect_db on'.
upvoted 0 times
...
Mauricio
9 months ago
Let's go with option B then.
upvoted 0 times
...
Queenie
9 months ago
I agree, enabling network connection for Apache sounds like the right solution.
upvoted 0 times
...
Nenita
9 months ago
I think option B is the best choice.
upvoted 0 times
...
...
Erasmo
11 months ago
I disagree, I believe the answer is B) setsebool -F httpd_can_network_connect_db on because it allows Apache to connect to a database.
upvoted 0 times
...
Sue
11 months ago
I think the correct answer is A) chcon -c httpd_sys_content_t /home/apache because it changes the security context of the file.
upvoted 0 times
...

Save Cancel