I created a php file to run git pull when there is a git push. added it to bitbucket webook.
But Im running into permission issue. I checked the Owner/Group of my /var/www/html/ is root root. and the /var/www/html/.git/ is also root root. I am running ubuntu 14.04 and apache2
Error Log:
error: cannot open .git/FETCH_HEAD: Permission denied
Webhook file:
<?php
$output = shell_exec('git pull');
echo "<pre>$output</pre>";
?>