我正在使用 Laravel 5.4 ,我运行了作曲家更新以更新到 5.4.27 的最新版本。当我尝试使用命令php artisan serve运行我的服务器时,它不起作用,我不断在所有php artisan命令上收到此错误 [ErrorException] file_put_contents(/引导/缓存/ services.php):无法打开流:权限被拒绝
答案 0 :(得分:2)
问题是工匠无法写入“bootstrap / cache / services.php”。 您可以使用chmod更改权限来解决此问题:
# chmod 664 bootstrap/cache/services.php
另外,不要忘记设置此文件的正确所有者/组(可能是www-data):
# chgrp www-data bootstrap/cache/services.php