Permission in CakePHP Using EC2 Instance



I have new instance in AWS. I have make var/www directory using PuTTy. I have upload all file to var/www/html directory. When i open IP Public Instance in Web Browser there are :slight_smile:

Warning: _cake_core_ cache was unable to write 'cake_dev_id' to File cache in /var/www/html/lib/Cake/Cache/Cache.php on line 322
Warning: /var/www/html/app/tmp/cache/persistent/ is not writable in /var/www/html/lib/Cake/Cache/Engine/FileEngine.php on line 384

Then i changed permission:

sudo chmod -R 777 /var/www/html/lib
sudo chmod -R 777 /var/www/html/app

But when i changed the permission there are an error:

Error: Cannot use โ€˜stringโ€™ as class name as it is reserved File: /var/www/html/lib/Cake/Utility/String.php Line: 24


Follow this


but i am not using php 7. i am using php 5 @aavrug


Ok but did you followed the log?


yes ofcourse, please review the question. i have follow the right steps. @aavrug


The first two warning mostly come when there is no 777 permissions to tmp, log so please assure that you have set permissions 777 to tmp and log.
The second error mostly arise because of incompatibility hopefully you have followed the log for that.


my tmp and log folder is in app and lib. so i just set permisions 777 to app and lib folder.
tell me if there is something wrong


I am not sure why you changed the entire app and lib permissions because in the doc they asked only to change the permission of tmp and log.