apache2 - PHP Write Permission - FC13 -
i have installed fc13 , attempting write mechanism in php code caches gathered data specific directory (for our purposes here, let's call /var/www/html/_php_resources/cache).
i copy files on /var/www/html directory , run chown -r apache:apache /var/www/html/*
, chmod a+w /var/www/html/_php_resources/cache
on new data. right using global write permission convenience. tweak permissions later.
when attempt use chmod
or mkdir
php functions wind with:
warning: chmod(): permission denied in /var/www/html/_include/php/cacheinit.php
or
warning: mkdir(): permission denied in /var/www/html/_include/php/cacheinit.php
now, when disable selinux works fine. problem prefer not disable selinux , permissions set correctly can port on servers not have such explicit control.
as example: personal site host allows me set read/write permissions on directories not allow selinux policy changes.
fyi:
- uname -r = 2.6.34.7-56.fc13
- *php -version * = php 5.3.3
- rpm -qa | grep httpd = httpd-2.2.16-1.fc13
does have suggestions?
i had same problem, trying mkdir php. not information on google found , guess correct solution. 1 have label dir in apache should create directories.
label should "httpd_sys_script_rw_t" , found info here: http://docs.fedoraproject.org/en-us/fedora_core/5/html/selinux_faq/index.html#id672528
here's how label dir: chcon -r -t httpd_sys_script_rw_t <dir>
reference somewhere here: http://www.centos.org/docs/5/html/deployment_guide-en-us/rhlcommon-chapter-0017.html
hope out there.
Comments
Post a Comment