Hi, I have developed a laravel app and host it to my private server using WinSCP. But when I hit http://192.168.41.81/vesMain this it's showing meThe 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=flase 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?
This really depends on your server set up. Permission 644 in a regular Apache/PHP set up is usually not enough to allow the webserver to write to files.
Try to change the permission to 777 and see what happens. If the error disappears after you've changed the permission, you at least know it's a permission issue and you can tackle it accordingly.
@ Thyrosis Once again I clean the cache and then upload the file. but now it's showing There is no existing directory at "C:\laragon\www\vesFinal\storage\logs" and its not buildable: Permission denied . If I changed the permission to 777 but the error message is same. Is there any problem with Apache server?
I'm not really sure, never had this issue. What I do notice is that in your original post, the error points to /var/www/html/vesMain/storage/logs/laravel.log while in your reply, the error is C:\laragon\www\vesFinal\storage\logs.
This seems to be virtually impossible, as the original error indicates a Linux server, while the next one points to a Windows environment.
It'll be a combination of some settings and caching. Apart from that, I'm unable to direct you any further I'm afraid. Maybe this thread on StackOverflow gives you a lead: