Vagrant Homestead 'storage' 文件夹权限被拒绝

Vagrant Homestead 'storage' folder permission denied

运行 Laravel 在 Homestead 上给出了以下错误:

The stream or file "/var/www/laravel/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

现在我明白 storage 的权限不正确,但尝试以下操作无效:

我不确定下一步该做什么。任何帮助将不胜感激。

谢谢。

对我来说,使用 Laravel 和 Homestead 时没有任何权限问题;它开箱即用。

无论如何,SSH 进入你的 Vagrant 机器,进入项目的根目录并运行执行以下命令。

sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache