In order to add a new admin page, I follow this tutorial :
in the routes.xml, If I use as it is said the module name for id and frontname, I get an error when I try to access magento2 backend
routes.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="admin">
<route id="modulename" frontName="modulename">
<module name="Mine_Modulename" />
</route>
</router>
</config>
error :
a:4:{i:0;s:227:"Warning: file_put_contents(/var/www/html/magento/var/cache//mage-tags/mage---365_STORE_RELATIONS): failed to open stream: Permission denied in /var/www/html/magento/vendor/colinmollenhour/cache-backend-file/File.php on line 663";i:1;s:4199:"#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'file_put_conten...', '/var/www/html/m...', 663, Array)
#1 /var/www/html/magento/vendor/colinmollenhour/cache-backend-file/File.php(663): file_put_contents('/var/www/html/m...', '365_RESOLVED_ST...', 10)
#2 /var/www/html/magento/vendor/colinmollenhour/cache-backend-file/File.php(179): Cm_Cache_Backend_File->_updateIdsTags(Array, Array, 'merge')
#3 /var/www/html/magento/vendor/magento/zendframework1/library/Zend/Cache/Core.php(390): Cm_Cache_Backend_File->save('a:2:{i:0;a:1:{i...', '365_RESOLVED_ST...', Array, NULL)
#4 /var/www/html/magento/vendor/magento/framework/Cache/Core.php(74): Zend_Cache_Core->save('a:2:{i:0;a:1:{i...', 'RESOLVED_STORES...', Array, NULL, 8)
#5 /var/www/html/magento/vendor/magento/framework/Cache/Frontend/Adapter/Zend.php(47): Magento\Framework\Cache\Core->save('a:2:{i:0;a:1:{i...', 'RESOLVED_STORES...', Array, NULL)
#6 /var/www/html/magento/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(75): Magento\Framework\Cache\Frontend\Adapter\Zend->save('a:2:{i:0;a:1:{i...', 'resolved_stores...', Array, NULL)
#7 /var/www/html/magento/vendor/magento/framework/Cache/Frontend/Decorator/TagScope.php(49): Magento\Framework\Cache\Frontend\Decorator\Bare->save('a:2:{i:0;a:1:{i...', 'resolved_stores...', Array, NULL)
#8 /var/www/html/magento/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(75): Magento\Framework\Cache\Frontend\Decorator\TagScope->save('a:2:{i:0;a:1:{i...', 'resolved_stores...', Array, NULL)
#9 /var/www/html/magento/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(75): Magento\Framework\Cache\Frontend\Decorator\Bare->save('a:2:{i:0;a:1:{i...', 'resolved_stores...', Array, NULL)
#10 /var/www/html/magento/vendor/magento/framework/App/Cache/Type/AccessProxy.php(85): Magento\Framework\Cache\Frontend\Decorator\Bare->save('a:2:{i:0;a:1:{i...', 'resolved_stores...', Array, NULL)
#11 /var/www/html/magento/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(75): Magento\Framework\App\Cache\Type\AccessProxy->save('a:2:{i:0;a:1:{i...', 'resolved_stores...', Array, NULL)
#12 /var/www/html/magento/vendor/magento/framework/Cache/Frontend/Decorator/TagScope.php(49): Magento\Framework\Cache\Frontend\Decorator\Bare->save('a:2:{i:0;a:1:{i...', 'resolved_stores...', Array, NULL)
#13 /var/www/html/magento/vendor/magento/module-store/Model/StoreResolver.php(123): Magento\Framework\Cache\Frontend\Decorator\TagScope->save('a:2:{i:0;a:1:{i...', 'resolved_stores...', Array)
#14 /var/www/html/magento/vendor/magento/module-store/Model/StoreResolver.php(85): Magento\Store\Model\StoreResolver->getStoresData()
#15 /var/www/html/magento/vendor/magento/module-store/Model/StoreManager.php(154): Magento\Store\Model\StoreResolver->getCurrentStoreId()
#16 /var/www/html/magento/var/generation/Magento/Store/Model/StoreManagerInterface/Proxy.php(119): Magento\Store\Model\StoreManager->getStore(NULL)
#17 /var/www/html/magento/vendor/magento/module-store/Model/Resolver/Store.php(29): Magento\Store\Model\StoreManagerInterface\Proxy->getStore(NULL)
#18 /var/www/html/magento/vendor/magento/framework/App/Config/ScopeCodeResolver.php(49): Magento\Store\Model\Resolver\Store->getScope(NULL)
#19 /var/www/html/magento/vendor/magento/framework/App/Config.php(79): Magento\Framework\App\Config\ScopeCodeResolver->resolve('stores', NULL)
#20 /var/www/html/magento/vendor/magento/module-backend/App/Area/FrontNameResolver.php(96): Magento\Framework\App\Config->getValue('admin/url/use_c...', 'store')
#21 /var/www/html/magento/vendor/magento/module-backend/App/Area/FrontNameResolver.php(79): Magento\Backend\App\Area\FrontNameResolver->isHostBackend()
#22 /var/www/html/magento/vendor/magento/framework/App/AreaList.php(73): Magento\Backend\App\Area\FrontNameResolver->getFrontName(true)
#23 /var/www/html/magento/vendor/magento/framework/App/Http.php(130): Magento\Framework\App\AreaList->getCodeByFrontName('admin_toto')
#24 /var/www/html/magento/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#25 /var/www/html/magento/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#26 {main}";s:3:"url";s:23:"/magento/admin_toto";s:11:"script_name";s:18:"/magento/index.php";}
Any idea?
Thank you for your help
var
folder.