Web/PHP
[ Laravel ] permission denied 문제
기저귀찬개발자
2019. 9. 3. 21:30
에러 문구
The stream or file "/home/laravel/sc_v2/storage/logs/laravel-2019-09-18.log" could not be opened: failed to open stream: Permission denied"
라라벨을 설치한 뒤에 웹서버의 permission denied 에러가 나올 경우 storage와 bootstrap/cache 폴더에 웹서버가 접근하지 못할 경우 생기는 에러이다
그룹권한을 웹서버에게 부여하면 해결된다.
sudo chown -R $USER:www-data storage
sudo chown -R $USER:www-data bootstrap/cache
chmod -R 775 storage
chmod -R 775 bootstrap/cache