我在laravel很新,事实上我正在努力创建我的第一个项目.由于某种原因,我一直收到这个错误(我还没有开始编码)
Error in exception handler: The stream or file "/var/www/laravel/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/laravel/bootstrap/compiled.php:8423
Run Code Online (Sandbox Code Playgroud)
我读过这与权限有关,但chmod -R 775 storage根本没有帮助.

我在设置Laravel 4时遇到问题.打开索引页面时出现此错误:
file_put_contents(/Users/laravel/app/storage/meta/services.json)[function.file-put-contents]:
无法打开流:权限被拒绝.
我在这里错过了什么?
我已经克隆了一个laravel repo到我的CentOS 7盒子里.当我尝试运行它时,我得到500错误,没有显示任何内容.
所以我查看了/var/log/httpd/error_log,我发现我有一些权限错误:
[Mon May 16 11:39:32.996441 2016] [:error] [pid 2434] [client 104.156.67.195:39136] PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/var/www/html/MYSITE/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/html/MYSITE/bootstrap/cache/compiled.php:13701
Stack trace:
#0 /var/www/html/MYSITE/bootstrap/cache/compiled.php(13635): Monolog\\Handler\\StreamHandler->write(Array)
#1 /var/www/html/MYSITE/bootstrap/cache/compiled.php(13396): Monolog\\Handler\\AbstractProcessingHandler->handle(Array)
#2 /var/www/html/MYSITE/bootstrap/cache/compiled.php(13494): Monolog\\Logger->addRecord(400, Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)
#3 /var/www/html/MYSITE/bootstrap/cache/compiled.php(13189): Monolog\\Logger->error(Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)
#4 /var/www/html/MYSITE/bootstrap/cache/compiled.php(13160): Illuminate\\Log\\Writer->writeLog('error', Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)
# in /var/www/html/MYSITE/bootstrap/cache/compiled.php on line 13701
Run Code Online (Sandbox Code Playgroud)
我已经做了以下尝试来克服这些问题:
chmod -R 775 storage
chmod -R 775 vendor
chown -R apache:apache storage
Run Code Online (Sandbox Code Playgroud)
所以它现在显示如下: …