Hello,
using m2.2.2 here. file and folders belongs all to www-data user and group, then I have another user that belongs to the same group. When this last user runs php bin/magento commands, the frontend breaks saying "can't write folder", and I have to go as root and give again chown www-data:www-data . -r command (sometimes more than once, tbh).
I don't understand why and how to solve this.
Thanks