Git issue

TC Dan

New Member
Sep 6, 2018
16
1
3
56
After running the install skript /var/www/fusionpbx belongs to www-data, which means when I try to do any git thingy as root I get the error:

fatal: detected dubious ownership in repository at '/var/www/fusionpbx'
To add an exception for this directory, call:
git config --global --add safe.directory /var/www/fusionpbx

Should I do as told and use git as root? Or should I use git as www-data?
 
as root user run commands below and then continue with your git pull

Code:
cd /var/www/fusionpbx
git config --global --add safe.directory /var/www/fusionpbx
 
Last edited:
All this means is that the files are owned by www-data and you are running the command under root.

If the files are owned by root then you wouldn't see the message. To increase security prevent this annoying issue and increase security we will be likely changing ownership of the web directory to root and www-data will only have read access.