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

Ronak Rathod
  • 6,322
  • 17
  • 42
ika
  • 43
  • 4

3 Answers3

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

Sumoborac
  • 109
  • 1
  • 8
  • 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 02 '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 07 '17 at 13:59
1

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

magento 2.1.6 installation

Teja Bhagavan Kollepara
  • 3,816
  • 5
  • 32
  • 69
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
Rendy Eko Prastiyo
  • 1,479
  • 8
  • 16