首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Hubzilla无法启动: /store/[data]/smarty3必须由webserver写

Hubzilla无法启动: /store/[data]/smarty3必须由webserver写
EN

Stack Overflow用户
提问于 2018-12-01 22:41:50
回答 1查看 105关注 0票数 0

我按照手册的指示在这里设置Hubzilla。

Installation

我执行了命令

代码语言:javascript
复制
chmod -R 777 store

但是,当我在浏览器中查看页面时,它仍然给了我这个错误。

代码语言:javascript
复制
ERROR: folder /var/www/html//store/[data]/smarty3 must be writable by webserver.

我试着用chown -R apache:apache storechmod o-w -R store来收紧它,但是这不起作用,所以我又运行了chmod -R 777 store。这是权限。

代码语言:javascript
复制
[root@fsphub html]# ls -ld store
drwxrwxrwx. 3 apache apache 20 Dec  1 22:08 store

[root@fsphub html]# ls -lR store
store:
total 0
drwxrwxrwx. 3 apache apache 21 Dec  1 22:08 [data]

store/[data]:
total 0
drwxrwxrwx. 2 apache apache 6 Dec  1 22:08 smarty3

store/[data]/smarty3:
total 0

Apache以apache的形式运行。

代码语言:javascript
复制
[root@fsphub html]# ps -ef | grep http
root     16997     1  0 21:47 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   16998 16997  0 21:47 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND

有什么不对的?

PHP 7.2.12

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-12-02 23:35:34

这是因为SELinux开着。https://wiki.centos.org/HowTos/SELinux

代码语言:javascript
复制
# sestatus
SELinux status:                 enabled
Current mode:                   enforcing

# sealert -a /var/log/audit/audit.log

SELinux正在阻止/usr/sbin/httpd对目录smarty3的写访问。 *插件httpd_write_content (92.2信任)表示* 如果希望允许httpd对smarty3目录进行写访问,则需要更改“smarty3”Do上的标签 # semanage fcontext -a -t httpd_sys_rw_content_t 'smarty3' # restorecon -v 'smarty3' 原始审计消息 tcontext=unconfined_u:object_r:httpd_sys_content_t:s0 type=AVC msg=audit(1543792561.65:60034):avc: pid=21907 comm="httpd“name="smarty3”dev="vda1“ino=621797 scontext=system_u:system_r:httpd_t:s0 tclass=dir的{ write }被拒绝

代码语言:javascript
复制
# ls -lZd store/\[data\]/smarty3/
drwxrwxrwx. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 store/[data]/smarty3/

所以我跑了

代码语言:javascript
复制
# semanage fcontext -a -t httpd_sys_rw_content_t store/\[data\]/smarty3/
# restorecon -v store/\[data\]/smarty3/

但那不管用所以我用了

代码语言:javascript
复制
setenforce 0

若要将模式更改为permissive,请执行以下操作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53575679

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档