Inflearn brand logo image

Inflearn Community Q&A

dhqkgo's profile image
dhqkgo

asked

The ultimate tech tree for PHP developers, Laravel lectures

This is a hands-on tutorial that sets up Docker, wsl2, and visual studio code, and finishes with sail up, including alias settings.

The stream or file "/var/www/html/storage/logs/laravel.log"

Written on

·

752

0

 The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: The stream or file

라고나오면서 신규 라라벨프로젝트가 안되는데

무엇이 잘못되었는지 알수 있나요?

phpLaravel

Answer 1

0

backchur님의 프로필 이미지
backchur
Instructor

라라벨 세일을 세팅하시던 도중에 권한 문제가 발생한 것으로 보입니다.

해당 오류는 프로젝트 폴더의 storage 내의 log 폴더에 쓰기 권한이 없어서 발생하는 오류입니다. (사진 참조)
image
해결을 하기 이전에 storage 폴더 안 권한이 제대로 작성되어 있는지를 확인해 주셔야 합니다.
통상적인 경우는 보시는 것 처럼 입력자도 wsl(리눅스 설치시 설정한 이름) 이고 권한도 wsl로 맞추어져 있습니다.
image
만약 이렇게 되어 있지 않은 경우, 프로젝트 최상위 루트에서 (아마 html 로 설정 되어 있으실 것 같습니다.)
chmod -R 777 storage/ 명령어로 해결하실 수 있습니다.

 

다만 강의를 따라가던 도중 권한 문제가 발생하였다면 설치를 처음부터 다시 해보는 것을 추천드립니다. 라라벨 세일을 작동시, 리눅스 루트 권한에서 실행 또는 설치를 해서는 안됩니다.

dhqkgo's profile image
dhqkgo

asked

Ask a question