Girocco::Project: Fix setgid bit being dropped in fork subdirectories
authorPetr Baudis <pasky@ucw.cz>
Mon, 21 May 2012 14:53:29 +0000 (21 16:53 +0200)
committerPetr Baudis <pasky@ucw.cz>
Mon, 21 May 2012 14:53:29 +0000 (21 16:53 +0200)
Girocco/Project.pm

index 6d3fce1..cf35f15 100644 (file)
@@ -155,9 +155,9 @@ sub _alternates_setup {
        my $forkee_name = get_forkee_name($self->{name});
        my $forkee_path = get_forkee_path($self->{name});
        return unless -d $forkee_path;
-       mkdir $self->{path}.'/refs'; chmod 0775, $self->{path}.'/refs';
-       mkdir $self->{path}.'/objects'; chmod 0775, $self->{path}.'/objects';
-       mkdir $self->{path}.'/objects/info'; chmod 0775, $self->{path}.'/objects/info';
+       mkdir $self->{path}.'/refs'; chmod 02775, $self->{path}.'/refs';
+       mkdir $self->{path}.'/objects'; chmod 02775, $self->{path}.'/objects';
+       mkdir $self->{path}.'/objects/info'; chmod 02775, $self->{path}.'/objects/info';
 
        # We set up both alternates and http_alternates since we cannot use
        # relative path in alternates - that doesn't work recursively.