Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

php+mysql under httpd in fc3: msg#00155

Subject: php+mysql under httpd in fc3
I run FC3 with targeted policies (default install). I have a problem running connecting to mysql server from php under apache - the problem is that httpd/php is denied write access to mysql.sock, something like this:

fc3 kernel: audit(1116843116.146:0): avc: denied { write } for pid=7281 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=375162 scontext=root:system_r:httpd_t tcontext=user_u:object_r:var_lib_t tclass=sock_file

Now, I have seen various modifications to policy sources that would allow it to work, but what I am asking is if it possible to do it without rebuilding policy from sources. The reason for this is that we need to make our ptoduce to install mysql & certain modules using it on user servers, and we can not count on policy sources being installed there. Also, the security of mysqld itself does not matter in this particular case and it is OK for us to run it unrestricted (it's separate server for this application only without network connection). The only problem is to allow restricted httpd to connect to that particular Unix socket.

I see that default system sources (apache.te) seem to include various types that seem to allow this, but I have no success in using them. If I try to use mysqld_var_run_t chcon gives me "Invalid argument", same with mysqld_db_t. Also, I see that httpd_php_t has can_unix_connect() rule, while httpd_t does not, however I did not find any documentation on what these types are, what's teh difference and how one can use httpd_php_t. I see httpd is running now under httpd_t according to ps -eZ.

I tries also to set mysql.sock into tmp_t, then write error disappears, and this one appears instead:

fc3 kernel: audit(1116844521.972:0): avc: denied { connectto } for pid=7275 exe=/usr/sbin/httpd path=/var/lib/mysql/mysql.sock scontext=root:system_r:httpd_t tcontext=user_u:system_r:unconfined_t tclass=unix_stream_socket

I am rather new to all SELinux concepts, so if anyone can give me some explanations about this or point me to some docs that describe these things it will be appreciated.

TIA,
--
Stanislav Malyshev, Zend Products Engineer stas@xxxxxxxx http://www.zend.com/ +972-3-6139665 ext.115



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe