Question

Hello I am using cakePHP's bake console to create a cakePHP application. But when I run the scripts, it says that the present user does not have permission to create a folder in the directory. So to find out the user who is being denied, I echoed whoami from the PHP script, and got the user. Now I made that user the owner of the directory. And as a check I even created folders on that directory from the terminal. But when the script runs via PHP, it spits the error on the terminal saying the user does not have permission.

What could the problem be?

Was it helpful?

Solution

On Ubuntu, ensure that the owner and group of the folders are both www-data. During the development phase, I also tend to make the permissions 777 or 755.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top