php - Execute symfony task command from the shell_exec() permission denied -


I have a "doNothing" Symphony Task call and I want to execute it as shell_exec ('/ var / www') I want to execute from / Symfony php symfony doNothing ');

Calling my symfony action

Apache refused to say the error

I think the www-data The user is not allowed to solve this.

Edit

  Error   

sh: / var / www / esm / symfony: Permission denied

You should look in the directory where your script is.

Use ls -la to display all the files in the folder and their permissions (to execute a php script file) x bit is assigned to www-data or its group.)

In addition to / in all the original directories, for x apache The user assigned to the group that is able to change the directory.

Look. You have a tree structured file system:

  • In / var / www / var
  • / Var / www / esm in / var / www
  • In / var / www / esm / symfony / var / Www / esm

    Then the www-data user should be able to execute all those directories ( x bit).

    Then when execute / to LS-L and x on Victor / var> See www for bit- Data users or groups (drw x rw x ---) and this is the owner of this directory. When ls -l is executed in / var ...

    You can change the permissions on 777 for each directory. But do not use the -R key simply change the permissions in the directory.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -