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

matus's avatar

meta/storage/services.json error

Hi there,

i am building my second application in laravel and recently i have encountered one error which i can not solve, no matter how hard i try.

I coded my application on my localhost and when i thought everything was done, i copied the whole directory to my shared hosting, i changed the paths as needed and everything was fine until suddently i got this error:

file_get_contents(.../app/storage/meta/services.json): failed to open stream. No such file or directory.

I checked whether the file existed on ftp, and it was not, so i copied it there from my localhost again (i copied entire directory before). However, it did not help and from time to time i get this error and i have no idea what to do with it.

Could you somehow help me to solve the problem?

Thank you very much :)

0 likes
5 replies
JoshWilley's avatar

This is a permissions issue. Make sure that the web server has write access to the "storage" directory.

matus's avatar

I am using L4 - i changed all permissions to the "storage" directory, however the error appeared again. I checked ftp and the services.json file wasn't there, so the application must have deleted it - no idea how's that possible.

fenos's avatar

did you use sudo chmod 777 -R app/storage for give the permission? Ther service.json will be generated by laravel don't worry about that.

matus's avatar
matus
OP
Best Answer
Level 2

I mailed my provider to change the permissions of the folder, however i got the error once again. .json file is not there anymore after the error...

UPDATE - i've got an idea - somehow i created cron - php artisan-optimize, which deletes the exact file, we were talking about - that php artisan optimize was running each minute, is it possible that when i refreshed exactly during server was performing the comand, laravel threw an error?

Please or to participate in this conversation.