file_put_contents(): failed to open stream: Permission denied

August 17, 2017 47.6k views
PHP PHP Frameworks LEMP Ubuntu 16.04

Hello Now I deployed a Laravel project and try Upload Photo this Error Return To me

file_put_contents(/var/www/html/test/public/img/photo-1.jpg): failed to open stream: Permission denied

what is solution

2 Answers

A simply search on an engine would've found you multiple soultions.
Source 1:
Lesson 1: Search the end of the error if you don't understand what to do in the event of an error. (99% of the time someone else has had the same issue before)

Have another answer? Share your knowledge.