Description of problem: SELinux is preventing /usr/sbin/php-fpm from 'write' accesses on the directory runtime. ***** Plugin catchall_boolean (89.3 confidence) suggests ******************* If you want to unify HTTPD handling of all content files. Then you must tell SELinux about this by enabling the 'httpd_unified' boolean. You can read 'httpd_selinux' man page for more details. Do setsebool -P httpd_unified 1 ***** Plugin catchall (11.6 confidence) suggests *************************** If you believe that php-fpm should be allowed write access on the runtime directory by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # grep php-fpm /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:httpd_t:s0 Target Context unconfined_u:object_r:httpd_user_content_t:s0 Target Objects runtime [ dir ] Source php-fpm Source Path /usr/sbin/php-fpm Port <Unknown> Host (removed) Source RPM Packages php-fpm-5.4.13-1.fc18.i686 Target RPM Packages Policy RPM selinux-policy-3.11.1-87.fc18.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 3.8.4-202.fc18.i686.PAE #1 SMP Thu Mar 21 17:14:12 UTC 2013 i686 i686 Alert Count 2 First Seen 2013-03-25 20:21:49 YEKT Last Seen 2013-03-25 20:21:49 YEKT Local ID e5597c27-b3d0-4f94-8b0d-60f969f31963 Raw Audit Messages type=AVC msg=audit(1364221309.69:363): avc: denied { write } for pid=1636 comm="php-fpm" name="runtime" dev="sda3" ino=1837742 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:httpd_user_content_t:s0 tclass=dir type=SYSCALL msg=audit(1364221309.69:363): arch=i386 syscall=access success=no exit=EACCES a0=b7d73b58 a1=2 a2=b783af28 a3=9 items=0 ppid=1598 pid=1636 auid=4294967295 uid=991 gid=989 euid=991 suid=991 fsuid=991 egid=989 sgid=989 fsgid=989 ses=4294967295 tty=(none) comm=php-fpm exe=/usr/sbin/php-fpm subj=system_u:system_r:httpd_t:s0 key=(null) Hash: php-fpm,httpd_t,httpd_user_content_t,dir,write audit2allow #============= httpd_t ============== #!!!! This avc can be allowed using the boolean 'httpd_unified' allow httpd_t httpd_user_content_t:dir write; audit2allow -R require { type httpd_t; } #============= httpd_t ============== apache_filetrans_home_content(httpd_t) Additional info: hashmarkername: setroubleshoot kernel: 3.8.4-202.fc18.i686.PAE type: libreport
I am do # setsebool -P httpd_enable_homedirs 1 # setsebool -P httpd_can_network_connect_db 1 # restorecon -R -v / but it not helps
The alert suggest httpd_unified. You have setup a php script to write into a users homedir?
Another option would be to change the label in the homedir to httpd_user_rw_content_t
> Another option would be to change the label in the homedir to httpd_user_rw_content_t It's helps, but why another script write logs into homedir without this?
We attempt to be secure by default allowing apache to only read default apache content directories. Users can change this default behaviour either by labeling content differently, or by setting a boolean to tell apache it can write to all its content.
*** Bug 986707 has been marked as a duplicate of this bug. ***
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.