Magento 2.3 bug on Windows: «Command line user does not have read and write permissions on generated directory»

code-generation
compilation
windows
command-line
magento23
(Dmitry Fedyuk) #1

0 Likes

Magento 2.3 bug: «Class Magento\Store\Api\Data\WebsiteExtensionInterface does not exist» on «setup:static-content:deploy»
«Can't create directory generated/code/Magento/Framework/App/ResourceConnection/.» in Windows
(Dmitry Fedyuk) #2

Magento 2 had a similar issue with Windows in 2016:

0 Likes

(Dmitry Fedyuk) #3

1. Magento\Framework\Console\Exception\GenerationDirectoryAccessException::__construct()

2. Magento\Setup\Console\CompilerPreparation::handleCompilerEnvironment()

3. Magento\Framework\Console\GenerationDirectoryAccess::check()

4. Magento\Framework\Filesystem\Directory\Write::isWritable()

5. Magento\Framework\Filesystem\Driver\File::isWritable()


0 Likes

(Dmitry Fedyuk) #5

It looks like the same issue: «Can’t create directory generated/code/Magento/Framework/App/ResourceConnection/.» in Windows

0 Likes

(Dmitry Fedyuk) #6

Magento 2.3 wrongly creates the generated folder’s subfolders (code and metadata) as read-only:

Magento\Framework\Filesystem\Directory\Write::create()

It sets the 511 (it is the same as 0777) permissions for a created folder:

0 Likes

(Dmitry Fedyuk) #7

The solution is to delete the generated folder.

0 Likes

(Dmitry Fedyuk) #8

The same problem: Magento 2.3 bug: «Class Magento\Store\Api\Data\WebsiteExtensionInterface does not exist» on «setup:static-content:deploy»

0 Likes

(Patrick Steil) #9

I struggled with this for hours and then figured out my docker instance was out of space.

Deleted all var/log files and everything started working again.

A symptom was that everytime I would run start my docker swarm it would indeed start 2 or 3 of the services needed for Magento. The expected output if you start your docker swarm multiple times is that it should just tell you each of the services are “up to date” instead of starting any of them.

Hope this helps somebody.

1 Like