views:

88

answers:

3

I'm running the latest Mercurial and Python 2.6; IIS6 is using the wildcard ISAPI method to attach the site to the Mecurial hgwebdir_wsgi

[paths]
\ = \\COMP3254\TestRepo\*

[web]
baseurl = /
allow_push = *
push_ssl = false
style = monoblue

The setup works perfectly if I reference the local drive E:\repo* but doesnt work if I specify the network as above; I've given the server (MERCDEV01$) full permissions on the shared folder on COMP3254, I can't think of any other reason it wouldn't work.

Any ideas?

A: 

Could be a delegation problem. You can NTLM-authenticate to the webserver (and your credentials will be trusted on its local drives), but the webserver can't authenticate you to a remote location, because it does not know your password (i.e. it can't delegate your credentials).

Have you tried setting up the network location as a virtual directory on the server? You can then enter credentials IIS will cache and use for accesses to that location.

Tomalak
Yep I've tried using a virtual dir to make sure the permissions are applied; am I right that setting up the virtual dir with my login details, I still leave the config as above in the example, or should I be using something else?
Chris M
A: 

hgwebdir doesn't work for me either with UNC paths - It means you can't use it as a server without hosting the repos on the same machine as the web server.

SWPalmer
PITA isnt it, and of course mapping it as a drive doesnt help
Chris M
A: 

Ok.. I solved it. The user running the web server (Apache in my case) defaulted to Local System, which does not have permission to access network resources. When I changed it to a user with domain access (and gave that user admin access to the local machine) everything worked fine.

Running a web server with that sort of privilege is of course risky - but in my case it is an internal server. Presumably you can cherry pick just the right permissions to do this in a more secure manner.

SWPalmer
I created a special local user and gave the server full permissions on the network folder but it didn't like it. Unfortunately creating unlinked users on the network is against our sox compliance, stupid American rules. Just have to carry on with SVN for now :o)
Chris M
Should point out I was using IIS6 so it user handling is a bit more akin to windows; it wouldnt work with my network user id and the test remote machine was my workstation. Mercurial just blows goats when it comes to UNC paths
Chris M

related questions