我是一个菜鸟,并在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
并解决了许可问题,但这可能不是最好的方法.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。