[issue2156] hg serve gives incorrect error if it does not have permission to read the repos
Faheem Mitha
bugs at mercurial.selenic.com
Sun Apr 25 06:24:53 UTC 2010
New submission from Faheem Mitha <faheem at email.unc.edu>:
faheem at orwell:/tmp$ hg init foo
faheem at orwell:/tmp$ su
Password:
[switching to www-data]
orwell:/tmp# su www-data
orwell:/tmp$ whoami
www-data
[running as www-data. everything ok so far]
orwell:/tmp$ hg -R foo serve
[remove permissions from repos]
faheem at orwell:/tmp$ chmod -R o-x foo/
faheem at orwell:/tmp$ ls -la foo/
total 28
drwxr-xr-- 3 faheem faheem 4096 2010-04-25 11:29 .
drwxrwxrwt 33 root root 20480 2010-04-25 11:29 ..
drwxr-xr-- 3 faheem faheem 4096 2010-04-25 11:29 .hg
[now running as www-data gives misleading error]
orwell:/tmp$ hg -R foo serve
abort: There is no Mercurial repository here (.hg not found)!
Something similar came up on IRC. I think similar errors are obtained with
hgwebdir.cgi, but maybe the error is coming from the same backend code.
Regards, Faheem
----------
messages: 12367
nosy: faheem
priority: bug
status: unread
title: hg serve gives incorrect error if it does not have permission to read the repos
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2156>
____________________________________________________
More information about the Mercurial-devel
mailing list