umask and permissions issue
Matt Mackall
mpm at selenic.com
Mon Jan 12 03:46:36 UTC 2009
On Mon, 2009-01-12 at 09:00 +0530, Ramashish Baranwal wrote:
> >> Hi,
> >>
> >> I want to set up a repository where multiple persons can commit. I am
> >> trying to do this through group write permission. For this, I have
> >> made the umask of users to be 0002 and put all of them into a common
> >> group, so that anyone in the group have write permission. The issue is
> >> when I tried to push some changes from another machine, the newly
> >> added files inside .hg/store/data end up with just read permission for
> >> the group, thus becoming non-modifiable for others.
> >> Am I missing something? I am using Ubuntu 8.04 server edition with hg
> >> version 0.9.5, the umask changes are made in /etc/bash.bashrc.
> >
> > Mercurial uses the mode of the .hg/store directory to compute a mask.
>
> Thanks Matt for such a quick reply :)
> The mode of .hg/store directory is 775, but it didn't propagate to
> newly added files in .hg/store/data/. Anything else needs to be done?
Ahh, the mode-inheriting code went into 1.0. Before that, Mercurial
ignored umask - it was the responsibility of the shell to set it. If
you're pushing over http, it'll use the umask of your webserver. You can
add something like:
import os; os.umask(0775)
to hgweb[dir].cgi
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list