Laravel无法打开流或文件"/storage/logs/laravel.log":无法打开流:权限被拒绝

5 apache2.4 ubuntu-16.04 laravel-5.5

我正在服务器上运行Laravel应用程序(Ubuntu 16.04).我有一个错误

无法打开流或文件"/var/www/mydomain.com/storage/logs/laravel.log":无法打开流:权限被拒绝

我已经谷歌我的问题.我找到了这个答案,但没有用.我无法设置777存储许可(这是危险的),正如我发现的许多其他答案所暗示的那样.
还有其他建议吗?


更新:

sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
Run Code Online (Sandbox Code Playgroud)

很有帮助

小智 17

这个命令很有帮助:

sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
Run Code Online (Sandbox Code Playgroud)


归档时间:

查看次数:

11608 次

最近记录:

8 年,4 月 前