php - Mercurial changes the file's owner after update -
i have php webapp controlled mercurial. it's in /var/www/directory/. files owned user , group 'www-data'. after pull changes, files become owned root.root.
that's because hg run root? it's remote server , have root access, how fix this? don't want run chown manually , recursively in directories after every pull, because there subdirs can't belong www-data .
don't know if i'm doing right, tried modify hgrc with
[trusted] users = www-data groups = www-data
didn't work
a new file created root when root running hg going owned root. can use sticky group bit set group, you're stuck root user.
you can put hook in repo's .hg/hgrc pretty easily. like:
[hooks] post-pull = chown -r user:www-data .hg
you said there directories want exclude, can in hook too.
Comments
Post a Comment