开发者

Push by user to mercurial repository causes http 500 error for other users

开发者 https://www.devze.com 2023-01-23 03:06 出处:网络
I have a开发者_开发问答 windows hosted mercurial repository that UserA, UserB and UserC have rights to push to.UserA can happily push/pull etc...but once UserC pushes...UserA starts to receive the fol

I have a开发者_开发问答 windows hosted mercurial repository that UserA, UserB and UserC have rights to push to. UserA can happily push/pull etc...but once UserC pushes...UserA starts to receive the following error:

abort: HTTP Error 500: .hg\store\data/_web/_mvc._sitemap.i: Access is denied

The only 'fix' for this is to nuke and re init the remote repository.

Does anyone have any experience with this type of issue?

Update: Repository is sitting on a drive on the server with IIS sitting on top of it. Users connect locally. Setup is pretty much right of the Mercurial wiki.


I'm putting tonfa's answer down here with a little extra info. This is completely normal, and really just how file systems work. When your users are pushing with direct disk access they're creating new files that are owned by them. Unless steps are taken to make sure those files owned by them are also writeable by their collaborators then subsequent pushers (and pullers depending on your default permissions) will be told they can't access the newly created files.

There are a few general ways to avoid this all of which are the server administrator's job not the pushing users's job. Either:

  • change permissions so that all new files are automatically added with permissions that allow all collaborators read/write access
  • make everyone use only the HTTP interface for pushing/pulling so all read/writes are done by the same (IIS) user

In unix land the former is easy to do using the "sticky group bit" and a "umask". On windows there's probably an even easier way that works only half the time. ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消