加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Yii / Linux上的Web进程权限

发布时间:2020-12-13 19:22:28 所属栏目:Linux 来源:网络整理
导读:我是一个菜鸟,并在AWS上运行Yii教程.到目前为止,我已经能够启动并运行 包括mysql连接.但现在我正在使用Gii代码生成工具来帮助创建一些模型类.这样做,我收到以下错误: generating models/User.php Unable to write the file '/var/www/html/blog/protected/m

我是一个菜鸟,并在AWS上运行Yii教程.到目前为止,我已经能够启动并运行 – 包括mysql连接.但现在我正在使用Gii代码生成工具来帮助创建一些模型类.这样做,我收到以下错误:

generating models/User.php
            Unable to write the file '/var/www/html/blog/protected/models/User.php'.
done!

文档还告诉我:

Info: Because the code generator needs to save the generated code into files,it is
required that the Web process have the permission to create and modify the corresponding
 files. For simplicity,we may give the Web process the write permission to the whole
 /www/blog directory. Note that this is only needed on development machines when using Gii.

这对我来说很有意义,我理解应用于用户和组的Linux权限的基本逻辑……但不是进程.有人能指出我如何给GII进程写入webroot(在我的情况下:/ var / www / html / blog /)目录中的权限吗?

最佳答案
我给所有用户priverlege递归地读取,写入和执行webapp文件.

$sudo chmod -R og=rwx webapp_folder

并解决了许可问题,但这可能不是最好的方法.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读