magento2: Path "/var/www/html/var" cannot be used with directory "/var/www/html/var"
I figured out it was a permission issue after a bunch of Googling, but I mean come on. This stuff should be fixed.
Preconditions (*)
- Magento 2.3.3
Steps to reproduce (*)
- Install Magento 2.3.3
- Have permission problems
- Do something
Expected result (*)
Useful error message about what directory is not writeable.
Actual result (*)
Useless error message. The problem is here:
$ grep "cannot be used with directory" -R *
vendor/magento/framework/Filesystem/Directory/PathValidator.php: 'Path "%1" cannot be used with directory "%2"',
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 16 (7 by maintainers)
Really? Do you find this error message to give adequate feedback to a developer on what the problem is?
No wonder Magento is pure nightmare to work with when you leave stupid issues like this in core all over the place.
I recommend reading this: https://uxplanet.org/how-to-write-good-error-messages-858e4551cd4
Hello @Zyles
Please check your r/w permission.
I forgot exactly which directory it was. It is a permission error and I already fixed it.
The problem is here:
Please update the message to something meaningful.
Maybe:
‘Can’t write to directory “%1”. Please check web server permissions.’
Or similar.