[Laravel] There is no existing directory at "/var/www/html/APP/storage/logs" and it could not be created: Permission denied

2022. 4. 14. 07:42프로그래밍/PHP

환경

Mac

PhpStorm

 

원인

bootstrap/cache 디렉토리에 있는 캐시 데이터 때문에 꼬였었던 것.

 

해결법

1. php artisan optimize:clear

2. sail artisan optimize:clear (laravel sail 사용하면 이것도 쳐보면 좋음)

3. bootstrap/cache/ 캐시 폴더 안에있는 모든 파일 삭제(사실 1번 실행하면 다 날라감! 그래도 확인해보기)

 

잡담

인터넷에 검색해보면 디렉토리 권한 바꿔보라 하는데 고거 다 안 먹힘.

그런 삽질은 하지 마시구 일단 캐시 관련된 거부터 다 지워보고 sail 사용자면 build --no-cache, 컨테이너 삭제 후 다시 설치.