How to allow fwrite php command in centos7? You must set exact directory for writing.  ( e.g. cache dir ):

semanage fcontext -a -t 'httpd_cache_t' '/path/to/www/cache(/.*)?'

restorecon -Rv /path/to/www/cache

Tip: do not disabling Selinux ! Is good reasons for prevent hack your site!

Tip2: http://www.serverlab.ca/tutorials/linux/web-servers-linux/configuring-selinux-policies-for-apache-web-servers/

enjoy!

SHARE IT:

Related Posts

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>