cakephp 처음 세팅시 아래와 같은 에러가 발생할 수 있다(경로 일부 생략)

Warning: _cake_core_ cache was unable to write 'cake_dev_ko-kr' to File cache in lib/Cake/Cache/Cache.php on line 306

Warning: _cake_core_ cache was unable to write 'cake_dev_ko-kr' to File cache in lib/Cake/Cache/Cache.php on line 306

Warning: app/tmp/cache/persistent/ is not writable in lib/Cake/Cache/Engine/FileEngine.php on line 320

Warning: app/tmp/cache/models/ is not writable in lib/Cake/Cache/Engine/FileEngine.php on line 320

Warning: app/tmp/cache/ is not writable in lib/Cake/Cache/Engine/FileEngine.php on line 320

Warning (512): _cake_model_ cache was unable to write 'default_blog_list' to File cache [CORE/Cake/Cache/Cache.php, line 306]

Warning (512): _cake_model_ cache was unable to write 'default_blog_list' to File cache [CORE/Cake/Cache/Cache.php, line 306]

Warning (512): _cake_model_ cache was unable to write 'default_posts' to File cache [CORE/Cake/Cache/Cache.php, line 306]

Warning (512): _cake_model_ cache was unable to write 'default_blog_posts' to File cache [CORE/Cake/Cache/Cache.php, line 306]

 
이는 서버가 app/tmp에  쓰기권한이 없을 때 발생한다.
해결방법은 app디렉토리로 이동해서 아래와 같이 입력하면 된다
$ sudo chown -R (서버 유저) tmp

이때 저 서버 유저를 모른다면 아무 php파일에 아래 내용을 추가해서 브라우저로 확인한다
whoami: <?php echo `whoami`; ?>

난 daemon으로 나오기 때문에 아래와 같이 입력했다
$ sudo chown -R daemon tmp

문제 해결!


License
달리 정하지 않는 한, 이 저작물 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
Except where otherwise noted, this content is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.0 Korea License

+ Recent posts