상세 컨텐츠

본문 제목

라라벨 초기 세팅 시 권한 문제 (Laravel Logs Permission Denied)

Framework/Laravel

by code_down 2024. 4. 5. 15:17

본문

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

 

라라벨 설치 이후 위 와 같은 에러는 디렉토리의 권한 문제입니다.

 

#nginx 이고 CentOS/RHEL 일 경우
sudo chown -R nginx:nginx storage bootstrap/cache

#apache 일 경우, nginx 이고 Ubuntu/Debian 일 경우
sudo chown -R www-data:www-data storage bootstrap/cache

 

 

디렉토리에 권한을 부여하여 해결할 수 있습니다.