I have setup laravel on a linux server and my apache is owned by root and www is owned by www-data and any new file created is owned by root user in the storage dir here is the screenshot of permissions for all directories inside /var/www/website/
And these are the permissions inside storage/logs dir. The newly created file is owned by the root user. Now, web server is unable to open this file for writing which causes errors on the website. I am not sure if this happens whent the root owns the file or when. But I kept ignoring this and kept applying a temporary fix by using the commands
sudo chmod -R 775 storage
or sudo chown www-data:www-data storage
I want to fix this error once and for all. For reference these are the permissions inside /etc/ dir
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire