Now we have a policy for php-fpm. Please, can we also have some for nginx webserver? +++ This bug was initially created as a clone of Bug #836502 +++ Description of problem: When PHP sites are served by alternative web server (nginx, lighttpd, cherokee, etc.) with php-fpm (PHP FastCGI Process Manager), SELinux does not provide as much security as with Apache webserver. Nginx is becoming very popular recently [1], it is a pity we do not have a policy for it. And the only way to restrict the PHP is to run it trough mod_php in Apache as a backend for nginx proxy. (Which sucks.) [1] http://news.netcraft.com/archives/2012/06/06/june-2012-web-server-survey.html Version-Release number of selected component (if applicable): any How reproducible: Steps to Reproduce: 1. install nginx and php-fpm, change php-fpm user from apache to nginx 2. systemctl start php-fpm.service nginx.service 3. ps axZ | grep -E '(nginx|php)' Actual results: system_u:system_r:initrc_t:s0 5334 ? Ss 0:00 php-fpm: master process (/etc/php-fpm.conf) system_u:system_r:initrc_t:s0 5335 ? S 0:00 php-fpm: pool www system_u:system_r:initrc_t:s0 5336 ? S 0:00 php-fpm: pool www system_u:system_r:initrc_t:s0 5337 ? S 0:00 php-fpm: pool www system_u:system_r:initrc_t:s0 5338 ? S 0:00 php-fpm: pool www system_u:system_r:initrc_t:s0 5339 ? S 0:00 php-fpm: pool www system_u:system_r:initrc_t:s0 5513 ? Ss 0:00 nginx: master process /usr/sbin/nginx system_u:system_r:initrc_t:s0 5514 ? S 0:00 nginx: worker process Expected results: ningx and php-fpm running is some more confined domain Additional info: ... --- Additional comment from Miroslav Grepl on 2012-12-16 11:22:00 CET --- commit fd3d7d3bf47fa42fb2731b3446ace6b82b3017ec Author: Miroslav Grepl <mgrepl> Date: Sun Dec 16 11:20:11 2012 +0100 Add support for php-fpm --- Additional comment from Dominick Grift on 2012-12-17 18:31:16 CET --- We should probably make nginx run in httpd domain as well. If i am correct ngix is currently not targeted --- Additional comment from Fedora Update System on 2012-12-17 19:40:44 CET --- selinux-policy-3.10.0-165.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-165.fc17
Dominick, AFAIK you were talking also about nginx, right?
Right, i would just run nginx in the httpd_t domain http://oss.tresys.com/pipermail/refpolicy/2011-March/004135.html
Would love to see this added to RHEL's policy. Was a bit shocked to find out that nginx runs in initrc_t, seeing how widely it is used as a webserver and accelerator. :)
This message is a reminder that Fedora 18 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 18. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '18'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 18's end of life. Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 18 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 18's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
There is imho still now policy on for nginx. So plz reopen.
apache.fc:/etc/nginx(/.*)? gen_context(system_u:object_r:httpd_config_t,s0) apache.fc:/usr/lib/systemd/system/nginx.* -- gen_context(system_u:object_r:httpd_unit_file_t,s0) apache.fc:/usr/sbin/nginx -- gen_context(system_u:object_r:httpd_exec_t,s0) apache.fc:/var/lib/nginx(/.*)? gen_context(system_u:object_r:httpd_var_lib_t,s0) apache.fc:/var/log/nginx(/.*)? gen_context(system_u:object_r:httpd_log_t,s0) apache.fc:/var/run/nginx.* gen_context(system_u:object_r:httpd_var_run_t,s0) is a part of newest releases.