Magento 2 Permissions Issue After Setup:di:compile Command

magento2

Every time I ran php bin/magento setup:di:compile command it gives me this error

Class Baianat\biusers\Controller\Index\Baianat\biusers\Model\UserFactory does not exist
Class Baianat\biusers\Controller\Index\Index\Interceptor generation error: The requested class did not generate properly, because the 'generated' directory
permission is read-only. If — after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write — t
he requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only.

and then all the permissions goes wrong.
Magento 2.4.3

Best Answer

the problem was

the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only.

so I fixed my class.

Related Topic