TailTemplate Build stunning websites faster with our pre-designed Tailwind CSS templates

Permission denied in CakePHP bake console + Eclipse+ Mac

Recently when we were testing development environment in Mac using CakePHP. We have encountered an interesting issue. We thought it is nice to post it here, in case any of you encounter the same problem. Hopefully this will help you.

Scenario

  1. We use "Eclipse for PHP Developers" plugin for development.

  2. We followed this post to set up CakePHP properly on Mac.

  3. When we try to use Cake Bake console from terminal(suppose our CakePHP project is "cake-test"), we encountered follow error message:

   cake bake
   /Applications/MAMP/htdocs/cake-test/cake/console/cake: Permission denied

At first, we thought this issue is caused by Mac file' permission, however even we set file permission to 777, the error still happens. Below is how we can solve the problem.

Solution

  1. Locate file "cake/console/cake", and select its Properties. bake-cake-mac
  2. Set Permissions to "Execute" for its owner from Resource panel. bake-cake-mac
  3. Click "OK" after it is done.
  4. Now you should be able to run Cake Bake console.

The end

Hopefully this simple tip helped you with your development. If you like our post, please follow us on Twitter and help spread the word. We need your support to continue. If you have questions or find our mistakes in above tutorial, do leave a comment below to let us know.