(UNIX/LINUX)

Usually on a local Development Environment we fight with permission, this is really annoying things because sometime what we think is a code bug is just a file not accessible to apache.

The main problem is that some files are created by Apache ( so the web app ) other are created by the developers ( IDE or Editor )

The solution that I use it to add my user to apache group:

-`sudo usermod -a -G www-data <username>`
 -`sudo chgrp -R www-data /var/www`

The issue is that when I create a new file with my IDE the files have [my user]/[my user] as owner and sometime apache is not able to read these files ( depending on the permission s flags)
So I'm forced to re-execute `sudo chgrp -R www-data /var/www`

Any solution to avoid this ?