Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

javierroman's avatar

Permissions storage folder in Forge

Hi all,

I am in the process of moving a Laravel web app from a shared hosting into Forge.

So far everything went fine with the exception of an error when the app saves files into the storage folder:

file_put_contents(/home/forge/jres/storage/app/quotes/quote-12391.pdf): Failed to open stream: No such file or directory

Anyone knows the best way to change permissions to the storage folder with Forge?

Many thanks!

0 likes
1 reply
javierroman's avatar

Finally I solved this problem. It had nothing to do with Forge or permissions of the storage folder. It was a minor detail related to barryvdh/laravel-dompdf,.

In the code:

PDF::loadView('pdf.quote_invoice', ['order' => $this, 'quoteOrInvoice' => 'quote'])->save(storage_path('app/quotes/Quote-') . $this->id . '.pdf');

I thought quotes folder would be created for the first time in storage/app, but it gave error:

file_put_contents(/home/forge/jrs/storage/app/quotes/quote-12391.pdf): Failed to open stream: No such file or directory

I onnected to the server via ssh and created the folder quotes in storage/app and now everything works fine.

Please or to participate in this conversation.