**List of steps to reproduce** (step by step, including full links if applicable):
The following steps are just for reproduction. The actual problem I've faced is PHPUnit run.
* Set up mwdd.
* `mwdev dev mw exec php maintenance/shell.php`
* `print_r( \MediaWiki\MediaWikiServices::getInstance()->getGlobalIdGenerator()->newTimestampedUID88() );`
Same on `mwdev dev mw exec --user root bash` but `mwdev dev mw exec --user nobody bash` can.
An exception is thrown:
> <warning>PHP Warning: fopen(/tmp/mw-GlobalIdGenerator-UID-88): failed to open stream: Permission denied in [[ https://github.com/wikimedia/mediawiki/blob/c20a33cadebe508c2bda79e5e0af63b13749f789/includes/libs/uuid/GlobalIdGenerator.php#L437 | /var/www/html/w/includes/libs/uuid/GlobalIdGenerator.php on line 437 ]]</warning>
> RuntimeException with message 'Could not open '/tmp/mw-GlobalIdGenerator-UID-88'.'
**What should have happened instead?**:
No exception should be thrown and the output should be printed.
**Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc**:
Maybe this is expected behavior. Feel free to close this if it is the case. If so, the help message about PHPUnit of `mwdev dev mw exec` should be changed to...
> exec --user nobody -- composer phpunit tests/phpunit/unit/includes/XmlTest.php # Run a single test
Although it seems to run PHPUnit as 'nobody' to have another permission problem :(