I have a vm where I run ubuntu 18.04 , Apache 2 and Magento 2.3 every thing works fine but I think I'm doing something wrong with my permissions.
So I have added to user 'dev' to the www-data group (dev is also the sudo user that I use to login )
but when I do
sudo chown -R dev:www-data /var/www
My Magento site stops working because it complains it has not access to the files. but when I run
sudo chown -R www-data:www-data /var/www
All work fine again and I don't understand why, because the user dev is added to the www-data group so it should have the wright permissions.
or should I run
sudo chown -R dev:www-data /var
I don't know?????