Magento – Magento 2 admin url gives error – Class Magento\Authorization\Model\RoleFactory does not exist

adminmagento2url

I have installed magento 2 on a local network (for example 192.200.200.200, and it is a virtual machine)

i was having some permission problems, had to run sudo php bin/magento setup:static-content:deploy

to create all css js required; public area looks fine but when i try to access mi admin url (192.200.200.200/admin_stuff) i get an error which is this: http://www.heypasteit.com/clip/2DKT

Could be a permission problem? right now all folder and file are own by root but folers var pub and app/etc are owned by the web user (www-data) with the right permissons

or maybe some file where not copied?

Best Answer

In my case, it was the issue with var/generation directory. Magento 2 creates Factory classes and stores in this directory.

I cleared var/generation directory and set it's ownership as that of var/cache and var/page_cache directory. And, now the issue is solved. I am able to login to admin again.

Related Topic