LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2012, 03:29 PM   #1
jstrang2005@gmail.com
LQ Newbie
 
Registered: Jul 2012
Posts: 1

Rep: Reputation: Disabled
selinux httpd_can_network_connect_db question


Hi everyone,

I have a question related to SELinux and in particular the httpd_can_network_connect_db flag.

I'm running fedora virtual machine inside a win 7 machine. About a year ago I installed phpMyAdmin and it ran without any problems. A week ago I tried going to http://localhost/phpMyAdmin and it gave me the following error (after entering the user and password into the login page of phpMyAdmin):

"2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)"

The SELinux icon went on in the desktop. After searching on the web, I found that I can fix the problem with this command:

# setsebool -P httpd_can_network_connect_db on

After that I can go into phpMyAdmin without problems. Just to test it out, I turn off the flag with:

setsebool -P httpd_can_network_connect_db off

and I verified that the flag is indeed off:

# getsebool httpd_can_network_connect_db
httpd_can_network_connect_db --> off

However, even after a reboot and clearing my firefox history, I can still go phpMyAdmin without any error.

Here are my questions:

1. Why is it that I can go into phpMyAdmin a year ago without problems? There was no more updates to Fedora 14 I access phpMyAdmin last year. What could have caused the change?

2. Why is it that when I turn *off* httpd_can_network_connect_db (after turning it on) I can still run phpMyAdmin?

I just wanted to know in case this issue comes up again especially in later fedora releases.

Thanks for your replies.

-jon
 
Old 07-25-2012, 04:43 AM   #2
shukmm
LQ Newbie
 
Registered: Jul 2012
Posts: 3

Rep: Reputation: Disabled
Hi,

Have you checked your selinux status in fedora? If the Selinux status is in permissive mode then you can able to access the site, but if it is in enforcing mode then you have to enable the flag.
 
Old 12-24-2013, 01:47 AM   #3
wr4pp3r
LQ Newbie
 
Registered: Dec 2013
Posts: 1

Rep: Reputation: Disabled
You can use -P option

Hi.

This post is old but is a reference from duckduckgo.com , the answer is: setsebool -P httpd_can_network_connect_db on

Source: https://access.redhat.com/site/docum..._Booleans.html

Thanks a lot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] A question about selinux... trist007 Linux - Newbie 2 06-19-2011 10:19 AM
SELinux question sang_froid Linux - Security 1 01-28-2010 04:13 PM
SELINUX Question Iamriccati Linux - Enterprise 1 12-04-2007 07:44 PM
SELINUX Question Iamriccati Linux - Server 2 12-04-2007 05:23 PM
selinux question ronin4601 Linux - Newbie 0 04-18-2004 02:59 PM


All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration