0

I got stuck (94% progress) in exception while installing magento2 after user creation. I have enabled the php error reporting on but not Luck.

Then i have tried to debug from terminal(CLI) and got exception. below are error messages please provide me solution.

Your inputs is really appreciable.

CLI command :

user@xxx-Aspire-Series:/var/www/html/magento2$ php setup/index.php install --db_host=localhost --db_name=magento2 --db_user=root --db_pass=root --base_url=http://127.0.0.1/magento2/ --backend_frontname=admin --admin_firstname=Admin --admin_lastname=admin --admin_email=abhi@magentodeveloper.com --admin_username=admin --admin_password=!-!&*#@123

Error Occurred:

Starting Magento installation:
File permissions check...
[Progress: 1 / 93]
Enabling Maintenance Mode...
======================================================================
   The application has thrown an exception!
======================================================================
Magento\Framework\Filesystem\FilesystemException
The file or directory "/var/www/html/magento2/var/.maintenance.flag" cannot be touched Warning!touch(): Utime failed: Permission denied
----------------------------------------------------------------------
/var/www/html/magento2/lib/internal/Magento/Framework/Filesystem/Driver/File.php:386
#0 /var/www/html/magento2/lib/internal/Magento/Framework/Filesystem/Directory/Write.php(198): Magento\Framework\Filesystem\Driver\File->touch('/var/www/html/m...', NULL)
#1 /var/www/html/magento2/lib/internal/Magento/Framework/App/MaintenanceMode.php(95): Magento\Framework\Filesystem\Directory\Write->touch('.maintenance.fl...')
#2 /var/www/html/magento2/setup/module/Magento/Setup/src/Model/Installer.php(485): Magento\Framework\App\MaintenanceMode->set(1)
#3 [internal function]: Magento\Setup\Model\Installer->setMaintenanceMode(1)
#4 /var/www/html/magento2/setup/module/Magento/Setup/src/Model/Installer.php(263): call_user_func_array(Array, Array)
#5 /var/www/html/magento2/setup/module/Magento/Setup/src/Controller/ConsoleController.php(312): Magento\Setup\Model\Installer->install(Object(Zend\Stdlib\Parameters))
#6 /var/www/html/magento2/setup/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(83): Magento\Setup\Controller\ConsoleController->installAction()
#7 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#8 /var/www/html/magento2/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#9 /var/www/html/magento2/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 /var/www/html/magento2/setup/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 /var/www/html/magento2/setup/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Console\Request), Object(Zend\Console\Response))
#12 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#13 /var/www/html/magento2/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#14 /var/www/html/magento2/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /var/www/html/magento2/setup/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#16 /var/www/html/magento2/setup/index.php(48): Zend\Mvc\Application->run()
#17 {main}
======================================================================
Previous Exception(s):
3

You need write permissions for the var-subfolder, in this case especially the var/.maintenance.flag file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.