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

codeOnJim's avatar

Symlink generates storage file instead of folder in laravel 11.

When I run sail artisan storage:link it successfully links the directory. Issue is it is a non-clickable file is generated inside public instead of a directory. When I hover over it, a little tooltip appears Invalid symlink I am on ubuntu. The filesystem.php is left as it is in default Laravel. Did not change nothing since it is ok the way it is now.

I checked my permission with ls -ld public i do get drwxr-xr-x 3 me me 4096. Any idea how to create a folder inside public rather than a file?

0 likes
5 replies
gych's avatar

Have you tried to create the symlink manually via CLI ?

jackthedev's avatar

Did you find a solution to this?

I have tried manually creating the symlink but still get "Invalid symlink".

codeOnJim's avatar

@jackthedev Yes, I had to install Symfony Filesystem package in order to establish the link. The issue was gone after installing the package.

puklipo's avatar

It's working correctly.

If it works fine within Sail then don't worry.

codeOnJim's avatar

@puklipo It did not work within the sail without a step on Linux. The reason I was here in the first place.

Please or to participate in this conversation.