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

Rolf12's avatar

League\Flysystem\Exception Impossible to create root directory

So I cloned an existing Laravel project from GitHub on my Mac computer then ran composer install to get all the dependencies and libraries that I'll need got an error before I created the .env file which pretty much stated couldn't connect or find tables blah... so I created the .env file place the proper variables to connect to my test db ! then ran composer composer install again and I got this error Impossible to create root directory "/srv/http/projectname/storage/masslogs/massCSVlog.".

at vendor/league/flysystem/src/Adapter/Local.php:112 108| clearstatcache(false, $root); 109| 110| if ( ! is_dir($root)) { 111| $errorMessage = isset($mkdirError['message']) ? $mkdirError['message'] : '';

112| throw new Exception(sprintf('Impossible to create the root directory "%s". %s', $root, $errorMessage)); 113| } 114| } 115| } 116|

  +3 vendor frames 

4 app/Console/Commands/MassCSVUploader.php:77 Illuminate\Support\Facades\Facade::__callStatic("createLocalDriver")

5 [internal]:0 App\Console\Commands\MassCSVUploader::__construct()

Any help would be greatly appreciated! Thank you so much!

0 likes
2 replies
automica's avatar

@rolf12 change the permissions on your storage directory and make it and its subdirectories writeable

chmod -R 777 /srv/http/projectname/storage/
Rolf12's avatar
Rolf12
OP
Best Answer
Level 3

the problem wasn't permission! I had to check my .env fill name the paths properly since I was running the project in my local environment all I had to do was change the /srv/http/ to the correct path since the project is located on my desktop so I had to change it Desktop/Sites/projectname/storege and it worked! like magic

Please or to participate in this conversation.