I have a php webapp controlled by mercurial. It's in /var/www/directory/. The files are owned by user and group 'www-data'. After I pull some changes, the files become owned by root.root.
That's because the hg is run by root? it's a remote server and I have only root access, how to fix this? I don't want to run chown manually and recursively in the directories after every pull, also because there are some subdirs which can't belong to www-data .
Don't know if I'm doing right, tried to modify the hgrc with
[trusted]
users = www-data
groups = www-data
didn't work