简体   繁体   中英

Laravel: laravel.log permission denied

When I try to open my Laravel app I get the following error:

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

Why is this and how can I fix it?

在终端中编写以下内容,并确保您位于projects目录中:

sudo chmod -R 777 storage/*

on FINDER right clic on STORAGE (inside ::your disk:: /Applications/XAMPP/xamppfiles/htdocs/laravel) folder and go to INFORMATION, go to bottom SHARING AND PERMISSIONS, there you must give READ AND WRITE permissions to EVERYONE. This option worked for me

NOTE: my OS languaje is SPANISH, may be text have some little variations; please, excuse my english

Maybe if you have installed Cent OS have to disable selinux.

setenforce 0

it will works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM