u 安装完 laravel7 后,访问网站出现权限错误

2020 年 5 月 14 日
 proxytoworld

第一次访问出现这个错误:The stream or file "/var/www/laravel/storage/logs/laravel.log" could not be opened: failed 有 v 友知道为什么吗,还没有进行编程 环境:ubuntu1804 + PHP7.2.24 + apache2.4.29 已进行 chmod -R 755 storage/

2345 次点击
所在节点    PHP
2 条回复
agdhole
2020 年 5 月 15 日
sudo chmod -R 755 laravel
chmod -R o+w laravel/storage
shellic
2020 年 5 月 15 日
chown 把文件所有者设置为 apache 的运行用户

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://study.congcong.us/t/671823

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX