CentOs 7和SELInux:用户不能写在Apache的Webroot中
我的用户不能添加,修改或删除没有sudo的Apache / PHP文件。 我的环境是: CentOS Linux版本7.2.1511 SELinux状态:启用 当前模式:执行 Apache 2.4.23 我的用户已经在Apache的组: $ id uid=1000(lmeza) gid=1000(lmeza) groups=1000(lmeza),10(wheel),48(apache) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 Apache的Webroot已经有了标签httpd_sys_content_t $ ls -Z /var/www drwxr-xr-x. root root system_u:object_r:httpd_sys_script_exec_t:s0 cgi-bin drwxr-sr-x. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 html 我有一个标签为httpd_sys_rw_content_t的目录,但我不能写在他身上: $ ls -lahZ /var/www/html drwxr-xr-x. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 modules $ touch /var/www/html/modules/abc.txt touch: cannot touch '/var/www/html/modules/abc.txt': Permission denied 正确获取文件访问控制列表: $ getfacl /var/www/html […]