after install lamp ubuntu 20.04 i achieved to install magento 2.1.4 version i can show home page but i can't reach to admin login page . as well as using this command to detect the exact url php bin/magento info:adminuri

Admin URI: /admin 'backend' => [ 'frontend' => 'admin' ]

baseurl/admin didn't work a2enmod rewrite
i tried all method such as file root .htaccess change the apache2.conf to AllowOverride All change the value in databases in table 'cor_config_data' and column 'web/seo/use_rewrite' to 0 systemctl restart apache2.service enter image description here i tried most method which i found but without any result

[enter image description here

  • If you are installing a fresh magento then you should install magento 2.3 or 2.4 why you are using so old version Commented Mar 1, 2022 at 11:09
  • i have some issue in my work that's why need to run old version then will upgrade Commented Mar 1, 2022 at 11:12
  • did you run setup upgrade and compilation Commented Mar 1, 2022 at 11:14
  • then remove the var/view_processod and var/cache folders Commented Mar 1, 2022 at 11:15
  • regarding remove var/view_processod and var/cashe using this command php bin/magento cache:clean rm -rf var/cache/* rm -rf var/generation/* Commented Mar 1, 2022 at 11:18

2 Answers 2


Change the permissions for the folders and files

permission for files
find . -type f -exec chmod 664 {} \;

permission for directory
find . -type d -exec chmod 775 {} \;

permission for var, pub and etc folder

find ./var -type d -exec chmod 777 {} \;
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml

Follow below step and test it's working.

First of the set the permission Magento files than run below all command.

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

sudo rm -rf pub/static/frontend sudo rm -rf pub/static/adminhtml sudo rm -rf var/cache sudo rm -rf var/composer_home sudo rm -rf var/generation sudo rm -rf var/page_cache sudo rm -rf var/view_preprocessed sudo rm -rf var/log sudo rm -rf generated/code/ sudo rm -rf generated/metadata/

php bin/magento maintenance:enable
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento setup:di:compile
php bin/magento maintenance:disable
php bin/magento cache:flush
php bin/magento indexer:reindex

sudo chmod -R 777 var/ generated/ pub/media/ pub/static/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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