Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've set up Mercurial via Apache (hgwebdir.cgi). I would like to have the same functionality as when using Subversion and AuthzSVNAccessFile, in which I can restrict which user has read or write permissions for every single repository. The acl extension only controls how changes are brought to the repository, as does the allow_push directive. Any thoughts?

share|improve this question
up vote 5 down vote accepted

There is an allow_read directive that can be added to a repository hgrc that works the same way as allow_push. If specified, and the user accessing the hgwebdir CGI script is not in the list, the project doesn't even show up at the index page.

share|improve this answer
Thanks a lot! The allow_read directive does not appear in the hgbook, nor in the wiki at when it describes hgrc. – mgv Jun 30 '09 at 15:08

They're served up via apache or lighttpd, right? So you could maybe hide them behind normal webby ACL things? (basic auth, etc)

Note that, as with git, as a consequence of they way they work, you're never going to be able to have control at any finer granularity than the repository level. You can grant whole-repo access or not, but never just 'you can read this one file in the repo' access.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.