Solvedbagisto Impossible to create the root directory "".

This error message appeared for me two times,
First after adding the product category, the second one after adding a product and hit save on this route (/admin/catalog/products/edit/1), however the category and the product seem to be added successfully even after this error.

I'm working on Ubuntu 18.04 for the last version of composer and Bagisto, not sure if it's a bug or there is something wrong with my basic installation of the packages.
Already update the composer dependencies.

Update: it seems to be a problem whenever I try to upload an image to the application whether it is a product or a category.

Screenshot from 2019-04-15 20-32-52

Environment & details:


channel "default"
locale "en"
_token "RLXafVNeXfQygz20IK4jKFEmchuJfQZSH8eNyx6s"
_method "PUT"
sku "34127864523467"
name "Men Navy Stripped T-Shirt"
url_key "men-navy-stripped-tshirt"
tax_category_id ""
new "1"
featured "0"
visible_individually "1"
status "1"
Wash_Care "Machine-wash"
short_description "

This is a short sleevs tshirt with rounded neck.

description "

A men t-shrit most suitable for medern youth style.

meta_title ""
meta_keywords ""
meta_description ""
price "300"
special_price "0"
special_price_from ""
special_price_to ""
weight "20"
inventories array:1 []
images array:3 []
categories array:1 []


21 Answers

✔️Accepted Answer

The following fixed it for me:

  1. shutdown artisan
  2. cd storage/app/
  3. unlink public
  4. startup artisan

When running php artisan storage:link, it recreates the public directory as a symlink, which is pointing to itself.
Not running php artisan storage:link won't create a symlink and fixes it (at least for me)

Other Answers:

First delete the PUBLIC folder/file from root/storage/app/ then delete STORAGE folder under root/publc, then first create PUBLIC folder in root/storage/app and then hit php artisan storage:link. All done. enjoy

Problem is, the "storage/app/public" directory is a symlink to the directory that does not exist anymore. That's why you are getting this error. Please follow the following points to resolve this issue:

1: Remove existing symlink:
cd storage/app/public

unlink public

2: From the project's root directory run the following command:

php artisan storage:link

First remove these folders


Then run the following command

php artisan storage:link

Related Issues:

bagisto Impossible to create the root directory "".
The following fixed it for me: shutdown artisan cd storage/app/ unlink public startup artisan When r...
magento2 2.3.4 Email Template New Pickup Order or add New Template order items are missing in Mail
In case it helps anyone If you're using a custom template for your order emails ...
magento2 Issue installing magento 2.3.5p1 on local server stuck at 51%
I found a workaround for Windows OS Image Adapter try opens to image files ('open function in
magento2 pub/static url contains deployed version.
Thanks Guys Quick solution: I have upgraded magento2 instance with latest git code today after upgra...
magento2 The shipping information was unable to be saved. verify the input data and try again.
Disabled all third party modules and still seeing same behavior Additional Details Detailed explanat...
woocommerce The Header Mini Cart does not update after a product is removed
Here is my fix EXPLANATION OF THE ISSUE After removing a product on the Shopping cart page /cart/ ...
magento2 Design configuration (2.1.0) does not save
Hello I have found a workaround for this issue Hello thank you for the effort you are making ...
magento2 2.3.3 - "Send Tracking Information" not working.
This is probably caused by customized e-mail templates based on previous versions ...
woocommerce Rethinking 3.6's Dashboard Ads (#22857 )
​It appears what you're doing here is tracking usage reporting that back to your API and returning t...
magento2 The Content-Security-Policy directive 'frame-ancestors' does not support the source expression ''unsafe-inline''
@refueledinc and @jmonrove solution is working @davirs Create a new module or use an existing one ...
magento2 js-translation.json not picking up theme translations 2.1.3 / 2.1.4
Hi @k7triton Great! The fix is below Sorry I don't have time to follow up myself ...
magento2 undefined function xdebug_disable()
magento2 Global Dependency on window.checkoutConfig
@SerhiyShkolyarenko @piotrekkaminski This isn't a new feature request it's a bug report Also it's no...
PrestaShop The left menu in BO disappeared after upgrade to
Hi @photinia73 @StraitsKapitan Do not rename the column active Status: Tech investigation still need...
magento2 Update 2.2.1: One or more integrations have been reset because of a change to their xml configs.
If you have no other integrations running php bin/magento module:disable Shopial_Facebook will solve...
magento2 Upgrade from 2.3.0 => 2.3.1 failed. "Unable to unserialize value"
Clearing redis cache ( redis-cli flushall ) resolved the issue for me. Hey I was trying to upgrade f...
magento2 2.0.9 : customer-data.js:49 Uncaught Error: [object Object]
GOT IT! It turns out that customer-data.js uses the localStorage to store a variety of stuff (probab...
magento2 Magento 2 suddenly does not work with REDIS anymore after upgrade to (M2.1.6)
Apologies I did rush through to find a solution and didn't spend the time to explain clearly I'll tr...
magento2 2.3.2 installed and bin/magento setup:upgrade not working
Note that there is a more official way to get the updated libsodium-dev package on debian ...
magento2 Product export gets "Message is added to queue, wait to get your file soon"
Can everybody who runs against this Just updated magento from 2.3.1 to 2.3.2 all looked fine until I...
magento2 Can't Access Component Manager
Magento 2.1.1 doc root /pub/ Web Setup Wizard menu still missing The component manager page returns ...
magento2 Uncaught SyntaxError: Unexpected token , in JSON
problem is the JSON object is broken and cannot be parse take a look at the line to fix this ...
magento2 Import failed: Area code not set: Area code must be set before starting a session.
We had to run an extra query (but maybe that is Magento Cloud specific in our case when moving a dat...
magento2 Catalog image resizing performance problems
Before leaving work yesterday I decided to see how long this operation would truly take As is tradit...
magento2 Huge "product_data_storage" in localStorage hangs the shop
Thanks for starting the discussion on this @krzksz - this is a great find! I noticed this when profi...
magento2 Uncaught Error: Script error for: trackingCode error on every frontend page
Running into the same issue over here after upgrading to version 2.2.2 Disabling uBlock Origin fixes...
PrestaShop 500 error: Kernel Container is not available
Hi @TedEriksson Checking out the diff for 1.7.6 in the payment module I use (mobilpay) ...
magento2 magento 2.3 Design Configuration > Global page keep loading
Open those files search for formElement=fileUploader replace with formElement=imageUploader in all f...
magento2 M2.3 – Sodium crypto adapter errors on unexpected input
tl;dr - check your crypt key matches where the database came from I had a very similar issue on Mage...
commerce env file
If you use the vercel cli you can use this vercel env pull .env.local super easy and the right keys ...
woocommerce Negative amount as fee and tax calculation in checkout
If someone is still looking for an answer here is mine It works like a charm Describe the bug I have...
magento2 ElasticSearch MG 234
Here's a simple patch I used to help fix this issue on Magento 2.3.4: Update: I've noticed that sort...
magento2 Magento_ReCaptcha... - Unable to serialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded
This is due to the MSP_ReCaptcha module storing the public key in plain text (type=text) ...
magento2 Pipeline deployment build failed "Uncaught Error: Call to a member function getPackage()"
Hi we have similar problem Workaround for that is remove generated data before deploy If var/view_pr...
magento2 Can't Disable Advanced Reporting
And even when you disable it the message shows in the dashboard this is in really bad taste Magento ...
magento2 Catalog price rule applied configurable products not show oldPrice in product list
Hi Preconditions Magento 2.1.2 PHP 7.0.11 Steps to reproduce Create a price rule and apply it (for e...
magento2 Images can't be uploaded using WYSIWYG if media directory is a symlink
Just ran into this issue too Here is the code I used to fix it (temporarily): etc/di.xml Override/Ap...
magento2 checksum verification failed for vertex/module-tax
@DanielRuf bumping this topic because this is still an issue Preconditions (*) Magento CE 2.2.3 Step...
magento2 On Magento 2.3.2, setup:upgrade command removes tables of disabled modules
Personally I would prefer letting the disabled table(s) and data untouched while running setup:upgra...
magento2 Payment config settings not decrypted when used?
Maybe this can help someone: I found that putting a <backend_model>Magento\Config\Model\Config\Backe...
magento2 Notice: Undefined index: label in /vendor/magento/module-backend/Block/Widget/Grid/Column/Filter/Select.php on line 73
I experienced this issue on Magento 2.1.6 but it was due to a custom payment extension ...
magento2 Grid pulls all data and doesnt have proper client/server pagination
Some magic for method appendXML() in file /var/www/html/vendor/magento/framework/View/TemplateEngine...
magento2 [Magento 2.2.5 - 2.3.x] Upload fails in image uploader
Same problem here after updating to 2.2.5 Additional Triage information Issue was re-verified on the...
magento2 Magento 2.3.3 notifications converted to attachments in MS Exchange - Disposition Header
my current hotfix patch was to patch vendor/zendframework/zend-mail/src/Headers.php Haven't got yet ...
magento2 Issue : Upgrade Magento 2.1.0 to 2.1.4 "out of stock" product main price changed to $0.00
This is not new problem it was in old version too just some classes were renamed ...
magento2 Admin Session Lifetime ignored
My issue was caused by PHP's session.gc_maxlifetime setting Apparently Magento makes use of PHP's na...
magento2 Guest can't use Paypal Express in cart
I resolved it by adding a subscriber to cart section if initial value is undefined ...
magento2 Usability issues with error/notice/success messages
I patched magento/module-ui using the composer-patches plugin to show the error message for 30 secon...
magento2 Latest laminas/laminas-escaper (2.7.0 -> 2.7.1) breaks product and catalog category view pages
I also spent a few hours yesterday troubleshooting after installing 2.4.2p1 Sorry but you are making...
magento2 Constant critical errors in system.log
It's worth noting that there are two distinct problems here The first: Magento ships with code that ...