{"id":1459,"date":"2020-09-22T16:25:05","date_gmt":"2020-09-22T11:25:05","guid":{"rendered":"http:\/\/alexeyka.zantsev.com\/?p=1459"},"modified":"2020-09-22T16:30:39","modified_gmt":"2020-09-22T11:30:39","slug":"centos-7-bind-to-privileged-port-without-root-access","status":"publish","type":"post","link":"https:\/\/alexeyka.zantsev.com\/?p=1459","title":{"rendered":"CentOS 7: bind to privileged port without root access"},"content":{"rendered":"\n<p>The error I faced:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ERROR:core:tcp_init_listener: bind(32, 0x7f72fe4879ac, 16) on 11.22.33.44:443 : Permission denied\nERROR:core:trans_init_all_listeners: failed to init listener [11.22.33.44], proto wss\nERROR:core:main: failed to init all SIP listeners, aborting<\/pre>\n\n\n\n<p>The service could not start neither manually (opensips -f \/path\/to\/cfg) nor via SystemD. The checking (opensips -C -f \/path\/to\/cfg) of config file showed no errors.<\/p>\n\n\n\n<p>Use &#8216;setcap&#8217; command.<\/p>\n\n\n\n<p>Example for OpenSIPS running as opensips:opensips.<\/p>\n\n\n\n<p>How I fixed:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">setcap CAP_NET_BIND_SERVICE=+eip \/usr\/sbin\/opensips<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The error I faced: ERROR:core:tcp_init_listener: bind(32, 0x7f72fe4879ac, 16) on 11.22.33.44:443 : Permission denied ERROR:core:trans_init_all_listeners: failed to init listener [11.22.33.44], proto wss ERROR:core:main: failed to init all SIP listeners, aborting The service could not start neither manually (opensips -f \/path\/to\/cfg) nor via SystemD. The checking (opensips -C -f \/path\/to\/cfg) of config file showed no errors. Use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[266,265],"class_list":["post-1459","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-privileges","tag-setcap"],"_links":{"self":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/1459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1459"}],"version-history":[{"count":5,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/1459\/revisions"}],"predecessor-version":[{"id":1464,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/1459\/revisions\/1464"}],"wp:attachment":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}