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 apache | 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屋!
查看全文