Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA Exam XK0-005 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:

Tiera
3 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
1 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
2 months ago
B) setsebool -F httpd_can_network_connect_db on
upvoted 0 times
...
Dana
2 months ago
A) chcon -c httpd_sys_content_t /home/apache
upvoted 0 times
...
...
Colton
3 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
1 months ago
User 3: Thanks for the solution, I will try running that command to resolve the error.
upvoted 0 times
...
Tasia
1 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
2 months ago
User 1: I think the issue is with the SELinux context of the Apache content directory.
upvoted 0 times
...
...
Markus
3 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
23 days ago
I see your point. 'setenforce 0' (option C) could also be a possible solution to consider.
upvoted 0 times
...
Yaeko
23 days ago
But wouldn't 'setsebool -F httpd_can_network_connect_db on' (option B) be more appropriate in this case?
upvoted 0 times
...
Milly
25 days 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
26 days ago
I think 'touch /.autorelabel' (option D) is the best choice here.
upvoted 0 times
...
Annamae
28 days 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
1 months ago
Actually, 'setenforce 0' (option C) might be the best choice to temporarily fix the problem.
upvoted 0 times
...
Trinidad
2 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
2 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
3 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
3 months ago
Hmm, that makes sense too. Let's see what others think before making a final decision.
upvoted 0 times
...
Reta
3 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
2 months ago
Great, let's try 'setsebool -F httpd_can_network_connect_db on'.
upvoted 0 times
...
Mauricio
2 months ago
Let's go with option B then.
upvoted 0 times
...
Queenie
2 months ago
I agree, enabling network connection for Apache sounds like the right solution.
upvoted 0 times
...
Nenita
2 months ago
I think option B is the best choice.
upvoted 0 times
...
...
Erasmo
3 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
4 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