lundi 22 juillet 2019

Laravel-5, Ngnix web server www-data perission issue

I'm running a Laravel 5.4 app in the Ngnix server. My all files and directory permissions are set to www-data:www-data user group. The problem is when I tried to run following PHP artisan command from the code using PHP exec() function, it is giving permission denied issue to create file under storage/log/ folder Which is already 777 and the queue was never executed.

$file_name = "queue-log";
exec('php artisan queue:work --tries=3 --stop-when-empty > storage/logs/'.$file_name.'.log &',$array);

When I simply try to do it by CLI, it works normally. My php.ini is not in safe mode and exec() is not under disabled functions list and exec("whoami") returns www-data when debugging from the browser. Any clues what is going on?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire