gpt4 book ai didi

php - file_put_contents 无法打开流 : Permission denied

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:45:19 25 4
gpt4 key购买 nike

我在尝试执行 file_put_contents() 时遇到此错误。

Apache 作为 apache 组运行,以 sudo 权限启动。我的用户在 apache 组中。所有目录和文件都有 755 chmod。

文件存在。

在本地它工作正常,在远程 CentOS 服务器上则不行。为什么?如何调试那个东西?

最佳答案

有时 SELINUX 会阻止写入,就像我从 Fedora 服务时遇到的问题一样。运行:

sudo setenforce 0

关于php - file_put_contents 无法打开流 : Permission denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26203664/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com