0

I'm currently running a Magento 2 (2.2.7) site and I've been getting the following error in the CLI when I enter certain commands (usually to do with enabling/disabling modules).

The directory "/var/www/vhosts/websitename.com/httpdocs/generated/code/Magento/Framework" cannot be deleted Warning!rmdir(/var/www/vhosts/websitename.com/httpdocs/generated/code/Magento/Framework): Directory not empty

I've also had some errors relating to Framework when certain modules are enabled.

I wondered what this error was and how to stop if from happening as I'm sure it's having some impact on my site.

asked Mar 5, 2019 at 13:38

1 Answer 1

0

Are you sure you are running the command with the correct user ?

Have a look at the following page, in which it is stated "Run all Magento CLI commands as the Magento file system owner."

https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-cache.html#config-cli-subcommands-cache-clean

Anyway, the generated folder contains all the files generated at runtime by Magento and should not cause any problem to remove all file that remains after a cache:clean command.

answered Mar 5, 2019 at 13:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.