::: Zany's Homepage ::: Zany Wiki | »çÀÌÆ® ÅëÇÕ °Ë»ö
 
 
 

[CentOS] (SELinux ȯ°æ) root °èÁ¤À¸·Î httpd ±âµ¿½Ã (13)Permission denied could not bind to address ¿À·ù.

°Ô½ÃÆÇ
Unix/Linux
ÀÛ¼ºÀÚ
helix
ÀÛ¼ºÀÏ
2016-07-05 18:44:22
ÀÐÀº¼ö
3251
ÆòÁ¡
   
Ç¥½Ã¿É¼Ç
HTML»ç¿ë | ÀÚµ¿BRűנ| °ø¹é¹®ÀÚÇã¿ë | °¡¿îµ¥Á¤·Ä | °íÁ¤Æø±Û²Ã | ÀÚµ¿URL¸µÅ© | ¸¶¿ì½º¼±ÅÃ
°ü·Ã¸µÅ©01
http://stackoverflow.com/questions/17079670/httpd-server-not-started-13permission-denied-make-sock-could-not-bind-to-ad 
SELinux ȯ°æÀ» »ç¿ëÇÏ´Â CentOS 6 ¿¡¼­
yum À¸·Î apache httpd ¸¦ ¼³Ä¡ÈÄ, ±âµ¿½Ã ¾Æ·¡¿Í °°ÀÌ ¿À·ù°¡ ¹ß»ýÇÏ¿´´Ù.



¾Æ·¡ ±Û¿¡¼­ º¸½Ã´Ù½ÃÇÇ,
SELinux ȯ°æ¿¡¼­´Â apache/httpd °¡ 80, 81, 443, 488, 8008, 8009, 8443, 9000 Æ÷Æ®¸¸ ¹ÙÀεù µÉ ¼ö ÀÖ´Ù.
(semanage port -l | grep http ¸í·É¾î·Î Çã¿ëµÈ Æ÷Æ®¸¦ È®ÀÎÇÒ ¼ö ÀÖ´Ù)
(semanage ¸í·ÉÀÌ ¾ø´Ù¸é, sudo yum -y install policycoreutils-python °ú °°ÀÌ yum À» ÅëÇØ ¼³Ä¡ÇÒ ¼ö ÀÖ´Ù)
I happened to run into this problem because of missing SELinux permissions.
By default, SELinux only allowed apache/httpd to bind to the following ports:
80, 81, 443, 488, 8008, 8009, 8443, 9000



µû¶ó¼­, httpd ¼³Á¤¿¡ À§ ¾ð±ÞµÈ Æ÷Æ® ÀÌ¿Ü ´Ù¸¥ Æ÷Æ®°¡ ¹ÙÀεù µÇ¸é, SELinux ȯ°æ¿¡¼­ ¿À·ù¸¦ ¹ñ¾î³½´Ù.
So binding to my httpd.conf-configured Listen 88 HTTP port and
config.d/ssl.conf-configured Listen 8445 TLS/SSL port would fail with that default SELinux configuration.



À̸¦ ¼öÁ¤ÇÏ·Á¸é, »ç¿ëÇÏ·Á´Â Æ÷Æ®¸¦ SELinux ȯ°æ¿¡ µî·ÏÇØ ÁÖ¾î¾ß Çϴµ¥, ¾Æ·¡¿Í °°Àº ¸í·É¾î¸¦ »ç¿ëÇÏ¿© µî·ÏÇÒ ¼ö ÀÖ´Ù.
(°¢ ¸í·É¾îÀÇ -p tcp [Æ÷Æ®¹øÈ£] ¿¡¼­ "Æ÷Æ®¹øÈ£" ´Â apache/httpd ·Î ¹ÙÀεù ÇÒ Æ÷Æ®¸¦ ÁöÁ¤ÇØ ÁÖ¸é µÈ´Ù)
(semanage ¸í·ÉÀÌ ¾ø´Ù¸é, sudo yum -y install policycoreutils-python °ú °°ÀÌ yum À» ÅëÇØ ¼³Ä¡ÇÒ ¼ö ÀÖ´Ù)
To fix my problem, I had to add ports 88 and 8445 to my system's SELinux configuration:

¡Ü Install semanage tools : sudo yum -y install policycoreutils-python
¡Ü Allow port 88 for httpd : sudo semanage port -a -t http_port_t -p tcp 88
¡Ü Allow port 8445 for httpd : sudo semanage port -a -t http_port_t -p tcp 8445



¾Æ·¡¿Í °°Àº ¸í·ÉÀ¸·Î apache/httpd ¿¡¼­ »ç¿ëÇÏ°íÀÚ ÇÏ´Â 9880 Æ÷Æ®¸¦
SELinux ȯ°æ¿¡ µî·ÏÇÑ ÀÌÈÄ Á¤»ó ±âµ¿ µÊÀ» È®ÀÎÇÒ ¼ö ÀÖ´Ù.


 °Ô½ÃÆÇ ±Û ¸ñ·Ï
No Subject Poster Hits Posted
13678 helix 3213 2016-09-13 14:36:17
13677 helix 5239 2016-09-13 10:33:50
13498 helix 5521 2016-07-08 00:48:24
13493 helix 1622 2016-07-06 02:46:55
13488 helix 1779 2016-07-05 19:39:23
helix 3251 2016-07-05 18:44:22
13081 helix 2395 2015-12-30 00:55:40
13079 helix 2212 2015-12-29 12:48:07
12851 helix 1900 2015-11-27 15:34:03
11855 helix 2125 2015-07-20 00:35:28
11004 helix 2556 2015-03-24 02:50:29
ÄÚ¸àÆ®
ÀÛ¼ºÀÚ
                       
 
zany.kr
  Copyright ¨Ï 2002-2010 Zany's Programming Lab. All Rights Not Reserved.
temporary This Page loads on 0.031 Secs