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

Čamo's avatar
Level 3

Laravel 5.7 deployment open_basedir error

Hi, me and my colleagues trying to make an automatic deploy for Laravel 5.7 project but without any success. After git pull we run common commands like php artisan optimize:clear php artisan config:clear php artisan config:cache php artisan storage:link. But at the end Laravel thorws an error:

file_exists(): open_basedir restriction in effect. File(/home/elias-itsolutions.sk/sub/natura/storage/logs/laravel-2020-10-01.log) is not within the allowed path(s): (/nfsmnt/:/data/:/usr/php73/:/usr/bin/:/apachetmp:/tmp/:/var/tmp/:/dev/urandom:/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/:/usr/local/bin/:/etc/ssl/certs/ca-certificates.crt)

Any suggestion what could be the problem? Thanks a lot.

0 likes
4 replies
jlrdw's avatar

Is this shared host with limitations. You may need to do that clearing prior to deploy.

Also make sure all required extensions are enabled.

Edit: Check the php version is correct also.

1 like
Čamo's avatar
Level 3

It is virtual machine with more repositories.

jlrdw's avatar

Does the storage folder have correct permissions.

1 like

Please or to participate in this conversation.