3

I had been struggling with Magento-CE-2_1_3 installation without success.

The installation process is always terminated because of the File Permission Check

"File Permission Check

4 file permission not met. Hide detail

The best way to resolve this is to allow write permissions for files in the following Magento directories and subdirectories. The exact fix depends on your server, your host, and other system variables. For help, see our File Permission Help or call your hosting provider.

"/var/www/html/mage2/app/etc" - Not writable, change the permissions. Show details
"/var/www/html/mage2/var" - Not writable, change the permissions. Show details
"/var/www/html/mage2/pub/media" - Not writable, change the permissions. Show details
"/var/www/html/mage2/pub/static" - Not writable, change the permissions. Show details"

Currently I ended up to change permissions to full access to all Magento content (files & directories). e.g drwxrwsrwx. 2 apache apache 84 Jan 25 18:24 etc

Even if the content has full right the Installer is giving notice that there is no permissions to certain content.

Unfortunately I haven't found the solutions from Magento DevDoc or other sites.

All advices are welcome!

---added 30.1-- enter image description here

--- added 2.2 ---

After CLI installation the error log is filled with following when index page is opened.

[Thu Feb 02 12:32:24.441225 2017] [:error] [pid 6955] [client 127.0.0.1:56438] PHP Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/var/www/html/mage2/var/page_cache" is not writable in /var/www/html/mage2/vendor/magento/zendframework1/library/Zend/Cache.php:209\nStack trace:\n#0 /var/www/html/mage2/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/var...')\n#1 /var/www/html/mage2/vendor/colinmollenhour/cache-backend-file/File.php(87): Zend_Cache_Backend_File->setCacheDir('/var/www/html/m...')\n#2 /var/www/html/mage2/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array)\n#3 /var/www/html/mage2/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)\n#4 /var/www/html/mage2/vendor/magento/framework/App/Cache/Frontend/Factory.php(155): Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...', Array, Array, true, true, true)\n#5 /var/www/html/mage2/vendor/magento/framework/App/Cache/Frontend/Pool.php(67): Magento\Framework\App in /var/www/html/mage2/vendor/magento/zendframework1/library/Zend/Cache.php on line 209

1

First, check if you are giving permissions to right files (you maybe have 2 folders with M2 files and you are modifying the wrong folder)?

Second, maybe try installing it using CLI option? See http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-subcommands.html

  • There is only one installation. Server version: Apache/2.4.6 (CentOS),PHP Version 7.0.14 – ika Jan 29 '17 at 11:37
  • Did you try CLI install? – Sumoborac Jan 30 '17 at 12:59
  • Yes [Compelte], but when opening the index page the error log "PHP Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/var/www/html/mage2/var/page_cache" is not writable... – ika Feb 2 '17 at 10:22
  • try running a simple php command: php -a // Then inside of php run: exec('whoami', $output); var_dump($output); This should give you info about which user is used for php process. Chown on that one and it should work. – Sumoborac Feb 7 '17 at 13:59
1

Check out this thread, this might help you with a solution.

magento 2.1.6 installation

0

If you use apache2, try this:

$ sudo chown -rf [your_username]:www-data /var/www/html/mage2/var
$ sudo chown -rf [your_username]:www-data /var/www/html/mage2/pub
$ sudo chown -rf [your_username]:www-data /var/www/html/mage2/app/etc

$ sudo find /var/www/html/mage2/var -type d -exec chmod 775 {} \;
$ sudo find /var/www/html/mage2/pub -type d -exec chmod 775 {} \;
$ sudo find /var/www/html/mage2/app/etc -type d -exec chmod 775 {} \;


$ sudo find /var/www/html/mage2/var -type f -exec chmod 664 {} \;
$ sudo find /var/www/html/mage2/pub -type f -exec chmod 664 {} \;
$ sudo find /var/www/html/mage2/app/etc -type f -exec chmod 664 {} \;

#addition to chmod the directory itself
$ sudo chmod 775 /var/www/html/mage2/var
$ sudo chmod 775 /var/www/html/mage2/pub
$ sudo chmod 775 /var/www/html/mage2/app/etc
  • Unfortunately, no change. chown -Rf magento_user:apache .... – ika Jan 30 '17 at 9:16
  • I have updated and added 3 commands to chmod the base directory. Give it a try. – Rendy Eko Prastiyo Jan 30 '17 at 10:02
  • Are you sure your username is magento_user? Are you sure the apache2 username is apache? The username of apache2 worker in my local (currently latest apache2 in Ubuntu 16.04) is www-data. – Rendy Eko Prastiyo Jan 30 '17 at 10:05
  • Thanks, but this didn't help. Argh. :-) – ika Jan 30 '17 at 10:08
  • egrep -i '^user|^group' /etc/httpd/conf/httpd.conf User apache Group apache – ika Jan 30 '17 at 10:09

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.