file_put_contents(): failed to open stream: Permission denied

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

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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)