Description
It is really hard to reproduce this error as I had it only 2 times during multiple (over 20 now) installation processes.
At the end of installation process I noticed this error in console:
Warning: unlink(foo\bar\AppData\Local\Temp\install.log): Permission denied in foo\bar\magento2\setup\module\Magento\Setup\src\Model\WebLogger.php on line 168
{"key":"28bb7d0ff44ef670a980dd0a202811fc","success":true,"messages":["For security, remove write permissions from these directories: \u0027foo\bar/magento2/app/etc\u0027 "]}
And it also causes Installation Incomplete error on screen. I noticed this error on Windows 7 and I think it may be one of two reasons:
- Windows just going crazy and block access to file (less probable)
- File is in use during write process and not yet closed when unlink() function is executed
Will it be a good solution to check directory permission (or file permission) and change it (just in case of first point) and to make sure just fclose() it before unlink().
If someone have a better idea just write :)
As I said it's hard to reproduce this error but I am going to implement solution worked out here and keep trying to break installation process just to make sure that its fixed.