40

I have tried EVERYTHING but i keep getting the following cake error:

( ! ) Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /var/www/bloglic-2013/cake/lib/Cake/Cache/Cache.php on line 309

Warning: /var/www/bloglic-2013/cake/app/tmp/cache/persistent/ is not writable in /var/www/bloglic-2013/cake/lib/Cake/Cache/Engine/FileEngine.php on line 336

( ! ) Fatal error: Uncaught exception 'CacheException' with message 'Cache engine _cake_core_ is not properly configured.' in /var/www/bloglic-2013/cake/lib/Cake/Cache/Cache.php on line 165

( ! ) CacheException: Cache engine _cake_core_ is not properly configured. in /var/www/bloglic-2013/cake/lib/Cake/Cache/Cache.php on line 165

Here is a list of the acess i have

total 116
-rwxr-xr-x 1 marc marc 23119 Aug  2 10:16 basics.php
-rwxr-xr-x 1 marc marc 13932 Aug  2 10:16 bootstrap.php
drwxrwxrwx 3 marc marc  4096 Aug  2 10:16 Cache
drwxr-xr-x 3 marc marc  4096 Aug  2 10:16 Config
drwxr-xr-x 2 marc marc  4096 Aug  2 10:16 Configure
drwxr-xr-x 4 marc marc  4096 Aug  2 10:16 Console
drwxr-xr-x 3 marc marc  4096 Aug  2 10:16 Controller
drwxr-xr-x 2 marc marc  4096 Aug  2 10:16 Core
drwxr-xr-x 2 marc marc  4096 Aug  2 10:16 Error
drwxr-xr-x 2 marc marc  4096 Aug  2 10:16 Event
drwxr-xr-x 2 marc marc  4096 Aug  2 10:16 I18n
-rwxr-xr-x 1 marc marc  1163 Aug  2 10:16 LICENSE.txt
drwxr-xr-x 3 marc marc  4096 Aug  2 10:16 Log
drwxr-xr-x 5 marc marc  4096 Aug  2 10:16 Model
drwxr-xr-x 4 marc marc  4096 Aug  2 10:16 Network
drwxr-xr-x 4 marc marc  4096 Aug  2 10:16 Routing
drwxr-xr-x 5 marc marc  4096 Aug  2 10:16 Test
drwxr-xr-x 6 marc marc  4096 Aug  2 10:16 TestSuite
drwxr-xr-x 2 marc marc  4096 Aug  2 10:16 Utility
-rwxr-xr-x 1 marc marc  1045 Aug  2 10:16 VERSION.txt
drwxr-xr-x 6 marc marc  4096 Aug  2 10:16 View
marc@Marc /var/www/bloglic-2013/cake $ ls -l lib/Cake/Cache/
total 28
-rwxrwxrwx 1 marc marc  4823 Aug  2 10:16 CacheEngine.php
-rwxrwxrwx 1 marc marc 16179 Aug  2 10:16 Cache.php
drwxrwxr-x 2 marc marc  4096 Aug  2 10:16 Engine

Can anyone give me a helping hand with this error?

3 Answers 3

45

Did you make the /app/tmp directory and its subdirectories writable?

More info on possible duplicate here (although title might be misleading):

Facing a file permission error while running CakePHP in Ubuntu 10.4

4
  • When you keeping app/tmp in different location than webserver default document root it's good to assign it a group of webserver and give access to this group. First change group: "chgrp -R app/tmp www" Then change access rights: "chmod -R g=rwx app/tmp" Your webserver group can be different. Default is _www on mac, www on linux as far as I remember. Commented Feb 5, 2014 at 12:37
  • 1
    On Mac, I had to run sudo chgrp -R _www app/tmp followed by chmod -R g=rwx app/tmp. Commented Jul 5, 2014 at 3:13
  • 2
    Further to user1415571, I had to mkdir models and mkdir persistent inside /cache on OSX.
    – MM.
    Commented Mar 24, 2015 at 15:52
  • @Sojtin you can reboot your docker. docker-compose down -v followed by docker-compose up -d
    – Invincible
    Commented Jan 2, 2019 at 16:51
18

Please also make sure below folders app/tmp/cache/models and app/tmp/cache/persistent exists and writeable.

1
  • Thanks for this hint! I had app/tmp/cache properly set in terms of permissions, but the subfolders weren't there and the application couldn't create them by itself, causing my error logs to soar. It is fixed now, thanks a million! Commented May 14, 2015 at 22:29
2

Check if SELINUX is running. Disable and try.

1
  • Disabling SELINUX and reboot actually worked for me.. I am using RHLE8 I already had rw permissions on all dir/subdir Those who want commands follow this link: cyberciti.biz/faq/…
    – Sagar S.
    Commented Jun 27, 2021 at 5:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.