ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 339 - XK0-005 discussion

Report
Export

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?

A.

chcon -c httpd_sys_content_t /home/apache

Answers
A.

chcon -c httpd_sys_content_t /home/apache

B.

setsebool -F httpd_can_network_connect_db on

Answers
B.

setsebool -F httpd_can_network_connect_db on

C.

setenforce 0

Answers
C.

setenforce 0

D.

touch /.autorelabel

Answers
D.

touch /.autorelabel

Suggested answer: B

Explanation:

The error indicates that SELinux is preventing Apache from connecting to the database. The command setsebool -F httpd_can_network_connect_db on allows the Apache web server to make network connections to the database, resolving the permission denied error without disabling SELinux entirely.

asked 09/10/2024
Ron Yan Paglinawan
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first