This problem killed by two days because i set all directory and subdirectory of “app/tmp” folder with permission 755 but when i run my cakephp application
it show the following permission Error.
I also change the owner of this folder ‘root’ once and again ‘apache’ all are same ‘/var/www/html/cakephp/app/tmp/cache/persistent/ is not writable’.
Finally after googling i found that in CentOs 7 Selinux is by default set in Enforcing mode. It oppose all type of access permission for different write operation.
And to overcome from this situation i execute the bellow command and my existing promlem solved.
Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/cakephp/lib/Cake/Cache/CacheEngine.php on line 60 Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /var/www/html/cakephp/lib/Cake/Cache/Cache.php on line 323 Warning: /var/www/html/cakephp/app/tmp/cache/persistent/ is not writable in /var/www/html/cakephp/lib/Cake/Cache/Engine/FileEngine.php on line 384 Fatal error: Uncaught exception 'CacheException' with message 'Cache engine _cake_core_ is not properly configured.' in /var/www/html/cakephp/lib/Cake/Cache/Cache.php:181 Stack trace: #0 /var/www/html/cakephp/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_') #1 /var/www/html/cakephp/app/Config/core.php(373): Cache::config('_cake_core_', Array) #2 /var/www/html/cakephp/lib/Cake/Core/Configure.php(72): include('/var/www/html/c...') #3 /var/www/html/cakephp/lib/Cake/bootstrap.php(175): Configure::bootstrap(true) #4 /var/www/html/cakephp/app/webroot/index.php(90): include('/var/www/html/c...') #5 {main} thrown in /var/www/html/cakephp/lib/Cake/Cache/Cache.php on line 181
- Open command prompt and check the current status of SeLinux on your CentOs 7 machine.
$ getenforce
SElinux by default has 3 modes which are Enforcing, Premissive and Disabled.
- Now we will set the SeLinux to permissive mode. To change SeLinux in permissive mode we will execute the bellow command.
$ setenforce 0
- Now for some cases you need to Reboot your CentOs 7 machine and check the status, the problem will be solved.