0
votes

I have a mercurial repository that I am serving via uwsgi+nginx. Both uwsgi and nginx belong to group www-data.

The repo belongs to user uwsgi and group www-data

When I change my permissions for the repository so that the group has rwx permissions, I can't push to the repo. If I give the owner (uwsgi) rwx permissions I can push to the repo. I don't understand why group permissions aren't sufficient.

1

1 Answers

1
votes

Using group permissions for this is a normal way to go, so we can definitely get this working.

When you're changing the permissions are you sure you're including the .hg directory and it's children (.hg/store, etc.) Also are you positive the uwsgi worker processes really have www-data as their group? It could be they're switching to some other user/group.

Perhaps starts by taking the hgweb.wsgi file and throwing some debugging messages in there that output user, group, and environment.

Bottom line: you're doing something that's entirely possible and a good idea, but there's something you're missing and I'm not able to find it in your question. Either take solace in the idea that what you're doing isn't impossible and keep looking or keep updating this question with extra details until it jumps out at me.