Wrong permissions when creating branch in shared directory

Eric Siegerman lists08-bzr at davor.org
Tue Dec 13 12:35:01 UTC 2011


On Thu, 2011-12-08 at 15:11 +1100, Martin Pool wrote:
On 8 December 2011 03:40, Luis Arias <kaaloo at gmail.com> wrote:
> > [...] when someone
> > creates a new branch, [...]
> > I have to regularly run this in the /bzr directory:
> >
> > sudo chmod -R g+rw,o-rwx .
> > sudo find . -type d | sudo xargs chmod g+s
> >
> > [to get]
> >
> > drwxrws---  3 luis  devs 4096 2011-12-01 14:11 memcached-extras

> I think you need to use pam_umask to set the umask under ssh
> <http://serverfault.com/q/228396/44697> - it's kinda complicated.

I'm not familiar with pam_umask, but from its name I can surmise
what it does :-)  And that leads to the guess that it will help
with the permissions, but not with the setgid bit.

For the latter, you need to set the setgid bit on /bzr itself;
from where, when Bazaar creates a new branch, the underlying
mkdir() system call will propagate setgid to the branch, and
thence, recursively, to its subdirectories.

  - Eric





More information about the bazaar mailing list