I have developed a laravel app and host it to my private server using WinSCP. But when I hit myurl it’s showing me The stream or file "/var/www/html/vesMain/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied
and if I set APP_DEBUG=flas
e then it’s showing 500 error``192.168.41.81 is currently unable to handle this request
. but I I saw the file permission is 644. I don’t know why this is happening? Can anyone have any suggestion?
2
Answers
I solved my problem using set the permission 777 to storage folder, logs folder and laravel.log file. Then set permission 777 view folder that inside into storage/framework/view and session(storage/framework/session) folder. Finally, clear the route and cache.
You can simply run those command.
Then just clear cache and route
Giving 777 permission is not at all a good practice. Its like you are giving authority to anyone to change your code. Try 775