I downloaded and installed a new Drupal 8 site via Composer.
I generated a new module using Drupal Console.
I tried running a phpUnit functional test of the newly generated module, and it keeps failing due to some folder permission:
Exception: Warning: chmod(): Operation not permitted Drupal\Component\PhpStorage\FileStorage->createDirectory()() (Line: 168)
What grind my gears is that it was working OK a few days ago. Something is clearly wrong with my system, I just don't know what that is, or what changed since then.
I'm running a WSL with Apache 2.4.37 (PHP Version 7.2.12-1+ubuntu18.04.1+deb.sury.org+1).
I have all the detailed steps to reproduce the case, my full phpinfo, and some more relevant information in this gist I created.
I spent the last few days browsing for a known solution, and some cases appear to be similar, but none of them seems to hit the spot.
I am using Windows 10.0.17134.407; the tests from the browser are passing. All the files and folders on the project are owned by 'zoio' (user and group); the file permissions for folders and files in modules, sites/default/files, and sites/simpletest are set to 0777.
I tried to follow the tips on this WSL issue, but I just ended up with a different failure, still related to permission and ownership.
Exception: User warning: mkdir(): Permission Denied
Drupal\Component\PhpStorage\FileStorage->createDirectory()() (Line: 174)
/mnt/c/www/temp/d8_temp/web/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php:51 (...) /mnt/c/www/temp/d8_temp/web/modules/custom/sandbox/tests/src/Functional/LoadTest.php:33
Tests: 1, Assertions: 1, Errors: 1.