
SE系搞特殊,研究了半天,只改本地机器的读写权限不够,还要赋予apache访问的权限才能访问
用chcon,比如
先用ls来看文件/文件夹权限
ls -alZ
-rw-r--r--. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 posting.php
-rw-r--r--. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 report.php
-rw-r--r--. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 search.php
drwxrwxr-x. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 store
将r 改成rw
比如:
chcon -t httpd_sys_content_rw_t /path/to/forum/config.php
这样就没有权限限制了,重要文件夹或文件写完后记得改回只读,比较麻烦。