Guides & TutorialsTroubleshootingCommon ErrorsTroubleshooting Impossible to create the root directory Errors

Troubleshooting Impossible to create the root directory Errors


An Oops error page may occur when sending an email via WHMCS or accessing the Utilities > System > System Cleanup page.

With the Display Errors option enabled, the following detail is provided:

League\Flysystem\Exception: Impossible to create the root directory "/folder/path". in /path/to/whmcs/vendor/league/flysystem/src/Adapter/Local.php:106

This message is typically encountered after moving a WHMCS installation to a new location.


This error is reporting that the storage location for email attachments cannot be read or created. Even if the email being sent does not contain an attachment, the storage location should still be readable by WHMCS at all times.


The solution to this error is to ensure the Storage Settings are correctly defined:

1. Navigate to Configuration > System Settings > Storage Settings > Configurations tab

2. Click the play icon next to each storage location to test it:

Test Storage Location Icon

3. The test results are displayed in the top right corner; green for success and red for an error:

Success Message
Error Message

4. Once the failing storage location has been identified, the next step is to create a valid location and switch over

5. Click the copy icon next to the failing storage location:

Copy Storage Location icon

6. Specify the correct path to the WHMCS Attachments directory

7. Click Save Changes

Add New Local Storage Modal

8. The page will re-load and the new storage location is listed

9. Click the Settings tab

10. Use the dropdown menus to change references to the failing storage location to the newly created valid location. Specifically for this error:

  • Client Files
  • Email Attachments
  • Ticket Attachments

11. Click the Switch button and then Continue:

Switch storage settings button

12. Repeat the process for each failing storage location



We suggest dividing the file types up between storage locations as follows:

File Type Directory
Client Files
Email Attachments
Email Template Attachments
Project Management Files
Ticket Attachments