Allowing a group to access a master hg repo under linux

Matt Mackall mpm at selenic.com
Tue Jan 20 13:34:25 CST 2009


On Tue, 2009-01-20 at 16:39 +0100, Marko Käning wrote:
> Hi Giorgos,
> 
> > `chmod -R g+w .hg' and a umask of 002 should be enough, don't set the
> > g+s flag.  Mercurial will then create files with the right permissions
> > to allow writes by group members.
> 
> umask 0002 is what I thought should be necessary, but although the various 
> ssh login shells are set to 0022 mercurial still creates all files and 
> directories with write access also for groups. Looks as if hg takes care 
> of this internally and does not rely on or limit itself by the shell's 
> settings. Is this true? Or am I missing something here?
> 
> I wonder why the s flag is not necessary or wanted. I thought it is 
> necessary to let the created files have the correct user/group.

Some time ago, we added code that makes hg set the mode for all new
files and directories based on the permissions of the .hg directory.

Before that, we relied on the operating system to do this via setgid
bits and properly configured umasks. Unfortunately, the average Unix
user's understanding of these two concepts is minimal.

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial mailing list