Hi i am using Ubuntu 18 and apache2
when i setup magento 2 on localhost
always have file permission problems and also
whenever i run
sudo php bin/magento setup:di:compile
it will cancel all file permission
already tried comment
sudo chmod -R 777 var/www/html/myproject/*
My Question: 1)How give proper file and directory permission to my magento project