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

Tirke's avatar
Level 8

Forbidden acces (403)

This one is getting on my nerve.

Laravel 5.3 project on hosting without ssh access. Host is set to look in ./public folder as web root. Site works fine.

I have a part of the site dealing with upload. There is a file preview thing where you can see the image. Uploading is working, i can see the files being saved in the storage folder. Preview doesn't want to work. It wasn't really fun to make the symlink between public/storage and storage/app/public. I needed to call Artisan from the code (remember no SSH). Nevertheless, i succeeded but the next problem is blowing my mind. Permissions are set to 777 on storage and all subfolders. Still everytime I want to acces something in storage folder : 403 (Forbidden).

Am I doomed ? Is there a solution ?

0 likes
2 replies
Tirke's avatar
Tirke
OP
Best Answer
Level 8

As always writing about a failure is the first step to find a solution.

I leave it there for anyone who might need it one day.

When i called

\Artisan::call('storage:link');

The symlink was not well-formed.

symlink('../storage/app/public', './storage');

Did the trick.

2 likes

Please or to participate in this conversation.