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

MassimoGnocchi's avatar

"php artisan storage:link" creates link to a "Permission Denied" page after deploy

Hello everyone. I am facing a problem here that I was not able to solve yet after a whole day. I have deployed my website on a dedicated server. Everything is working fine except for the dam storage link. I have deleted the old symlink, of course, and recreated it using the "php artisan storage:link" command from shell. And it creates it. If I type "dir public/storage" from my web root, I actually see the files. However from my browser I cannot see any picture from the storage folder, and I get a Permission Denied page when I try to go to mywebsite.com/storage/. How can I solve this?

Massimo.

0 likes
4 replies
Snapey's avatar

How do your other urls look. Are they correct and reflect the same as your routes in web.php?

Snapey's avatar

ahhh post link to same post (recursion: see recursion)

MassimoGnocchi's avatar

Right. My bad. Anyways the solution was creating the symlink with a PHP script.

In public/index.php: symlink('../storage/app/public', './storage');

Please or to participate in this conversation.