vendredi 17 mai 2019

Failed to open stream: Permission denied in /public/uploads/images every time a new post is created

I am using Laravel 5.7 on Ubuntu 16.04 with Nginx. Every time when I create a new post the image is stored in /pubic/uploads/images/IDofPost/imagename.png

I am using BKWLD/croppa: Image thumbnail to optimize the images, however every time a new post is creted a new crop is created as well and I get an error failed to open stream: Permission denied.

Until recently I was able to solve my problems with the following command chown -R www-data:www-data /var/www/

Now I have a problem, due to the volume of the files when I run this command I get an error 419 when trying to enter the admin dashboard and if I don't reboot the server I cannot log in. My scheduled commands stop working etc.

How can I make the permissions in /public/uploads permanent for every new file, directory etc?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire