最近我在 AWS 开了一个账户。我在 Ubuntu 上使用他们的 EC2。我安装了我的 Laravel 项目并在命令行中写了 chmod -R 777 storage
.现在我收到一个错误:
ErrorException in Filesystem.php line 81: file_put_contents(/var/www/html/BlueDrive/bluedrive/drive/bootstrap/cache/services.json): failed to open stream: Permission denied
我应该怎么做才能防止这种异常?
最佳答案
这是访问权限问题。
运行以下命令:
$ sudo chown nobody /var/www/html/BlueDrive/bluedrive/drive/bootstrap/
$ sudo chmod -R 0755 /var/www/html/BlueDrive/bluedrive/drive/bootstrap/
或
跑
chmod -R 777 /path/to/the/folder
关于php - 在 AWS 中安装后的 Laravel ErrorException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35487867/