Yii2 - Web 进程不可写目录 |前端/网络/资产 [英] Yii2 - The directory is not writable by the Web process | frontend/web/assets
本文介绍了Yii2 - Web 进程不可写目录 |前端/网络/资产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在互联网上搜索过这个问题,但没有一个对我有帮助.这个也没有:
I have searched this issue on internet but none of them helped me. Also this one doesn`t:
chgrp apache /path/to/mydir
chmod g+w /path/to/mydir
我的服务器是centos 7.你能帮帮我吗?
My server is centos 7. Can you help me?
推荐答案
尝试使用以下命令:
这会给你 apache 用户的名字.
<代码>ps -ef |grep阿帕奇|grep -v grep
在大多数情况下,用户将是 www-data.
This will give you the name of apache user.
ps -ef | grep apache | grep -v grep
In most of the cases the user will be www-data.
进入/frontend/web 文件夹后运行这些命令:sudo chgrp www-data ./assets
和
sudo chmod g+w ./assets/
Run these command after going into the /frontend/web folder: sudo chgrp www-data ./assets
and
sudo chmod g+w ./assets/
您的问题将得到解决.
这篇关于Yii2 - Web 进程不可写目录 |前端/网络/资产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文