How to set the proper filesystem permissions on Windows?

installation
windows
command-line
filesystem-permissions

(Dmitry Fedyuk) #1

Just after git pull and composer update the «File Permission Check» failed for me on Windows 7:

Firstly, I tried to set the permissions using the cmd tool:

attrib -r app\etc\*.* /s
attrib -r var\*.* /s
attrib -r pub\media\*.* /s
attrib -r pub\static\*.* /s

But it did not work for a some reason.

So I have successfully done it with Cygwin:

chmod -v -R 777 app/etc
chmod -v -R 777 var
chmod -v -R 777 pub/media
chmod -v -R 777 pub/static


How to set the proper filesystem permissions?
How can i give Magento 2.3 Write Permission to appropriate Folder in Windows?
(Zus Zus) #2

@dmitry_fedyuk After apply the command chmod -v -R 777 var , my mahento 2.3 installation return : Fatal error: Uncaught Zend_Cache_Exception: cache_dir “C:/wamp/www/mage2/var/page_cache” is not writable in C:\wamp\www\mage2\vendor\magento\zendframework1\library\Zend\Cache.php:209

whole error :

Fatal error: Uncaught Zend_Cache_Exception: cache_dir “C:/wamp/www/mage2/var/page_cache” is not writable in C:\wamp\www\mage2\vendor\magento\zendframework1\library\Zend\Cache.php:209 Stack trace: #0 C:\wamp\www\mage2\vendor\magento\zendframework1\library\Zend\Cache\Backend\File.php(180): Zend_Cache::throwException(‘cache_dir "C:/w…’) #1 C:\wamp\www\mage2\vendor\colinmollenhour\cache-backend-file\File.php(87): Zend_Cache_Backend_File->setCacheDir(‘C:/wamp/www/mag…’) #2 C:\wamp\www\mage2\vendor\magento\zendframework1\library\Zend\Cache.php(153): Cm_Cache_Backend_File->__construct(Array) #3 C:\wamp\www\mage2\vendor\magento\zendframework1\library\Zend\Cache.php(94): Zend_Cache::_makeBackend(‘Cm_Cache_Backen…’, Array, true, true) #4 C:\wamp\www\mage2\vendor\magento\framework\App\Cache\Frontend\Factory.php(156): Zend_Cache::factory(‘Magento\Framewo…’, ‘Cm_Cache_Backen…’, Array, Array, true, true, true) #5 C:\wamp\www\mage2\vendor\magento\framework\Cache\Frontend\Adapter\Zend.php(38): Magento\Framework\App\Cache\Front in C:\wamp\www\mage2\vendor\magento\zendframework1\library\Zend\Cache.php on line 209

How can i solve this error?