Question

I've got a fresh install of the new build of cakephp (1.3) and the bake console does not seem to be working.

I got to the folder in the console and do the usual cake bake and it doesn't seem to be working.

This is the output from the console:

xxxx:console yyyy$ ./cake bake
-bash: ./cake: Permission denied

Has something changed in the new version of cake?

Cheers.

Was it helpful?

Solution

First, notice that you can't run the command ./cake from the root of your CakePHP installation directory--the item called "cake" there is a folder, and can't be executed. The console executable is located at [installdir]/cake/console/cake.

When using bake, you'll want to do it from your app folder. If you've done much work already, it might be wise to first back up the app folder. Then, from your CakePHP installation folder, do

cd app
../cake/console/cake bake

and you should be all set.

OTHER TIPS

Using the terminal go to the directory in where you have the cake file. I talking about the /cake/console... once you are there run the next string

chmod 755 cake

and it's ready, the permission to execute the file is set.

If you're working on a Linux operating system:

1- Make sure that both (cake cake.bat cake.php) have writing permissions.

To do so:

2- In your terminal, once you are in your project directory:

cd app/Console 
ls -la

You should see the following:

3- now run the following commands:

chmod -R 777 cake
chmod -R 777 cake.bat
chmod -R 777 cake.php

In my terminal shell, the green color assures me that I now have the desired permissions

In my terminal the green color tells me that I now have the desired permissions

4- Now you should be able to run:

./cake bake

Did you get this to work? I think this could do the trick. (Running the command from your app directory

 chmod +x Console/cake
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top